In [67]:
    
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [16, 4]
import pickle
import pandas
import numpy as np
with open("final_project_dataset.pkl", "r") as data_file:
    data_dict = pickle.load(data_file)
    
In [2]:
    
data_dict.items()[0]
    
    Out[2]:
('METTS MARK',
 {'bonus': 600000,
  'deferral_payments': 'NaN',
  'deferred_income': 'NaN',
  'director_fees': 'NaN',
  'email_address': 'mark.metts@enron.com',
  'exercised_stock_options': 'NaN',
  'expenses': 94299,
  'from_messages': 29,
  'from_poi_to_this_person': 38,
  'from_this_person_to_poi': 1,
  'loan_advances': 'NaN',
  'long_term_incentive': 'NaN',
  'other': 1740,
  'poi': False,
  'restricted_stock': 585062,
  'restricted_stock_deferred': 'NaN',
  'salary': 365788,
  'shared_receipt_with_poi': 702,
  'to_messages': 807,
  'total_payments': 1061827,
  'total_stock_value': 585062})
In [3]:
    
data_dict.keys()
    
    Out[3]:
['METTS MARK',
 'BAXTER JOHN C',
 'ELLIOTT STEVEN',
 'CORDES WILLIAM R',
 'HANNON KEVIN P',
 'MORDAUNT KRISTINA M',
 'MEYER ROCKFORD G',
 'MCMAHON JEFFREY',
 'HORTON STANLEY C',
 'PIPER GREGORY F',
 'HUMPHREY GENE E',
 'UMANOFF ADAM S',
 'BLACHMAN JEREMY M',
 'SUNDE MARTIN',
 'GIBBS DANA R',
 'LOWRY CHARLES P',
 'COLWELL WESLEY',
 'MULLER MARK S',
 'JACKSON CHARLENE R',
 'WESTFAHL RICHARD K',
 'WALTERS GARETH W',
 'WALLS JR ROBERT H',
 'KITCHEN LOUISE',
 'CHAN RONNIE',
 'BELFER ROBERT',
 'SHANKMAN JEFFREY A',
 'WODRASKA JOHN',
 'BERGSIEKER RICHARD P',
 'URQUHART JOHN A',
 'BIBI PHILIPPE A',
 'RIEKER PAULA H',
 'WHALEY DAVID A',
 'BECK SALLY W',
 'HAUG DAVID L',
 'ECHOLS JOHN B',
 'MENDELSOHN JOHN',
 'HICKERSON GARY J',
 'CLINE KENNETH W',
 'LEWIS RICHARD',
 'HAYES ROBERT E',
 'MCCARTY DANNY J',
 'KOPPER MICHAEL J',
 'LEFF DANIEL P',
 'LAVORATO JOHN J',
 'BERBERIAN DAVID',
 'DETMERING TIMOTHY J',
 'WAKEHAM JOHN',
 'POWERS WILLIAM',
 'GOLD JOSEPH',
 'BANNANTINE JAMES M',
 'DUNCAN JOHN H',
 'SHAPIRO RICHARD S',
 'SHERRIFF JOHN R',
 'SHELBY REX',
 'LEMAISTRE CHARLES',
 'DEFFNER JOSEPH M',
 'KISHKILL JOSEPH G',
 'WHALLEY LAWRENCE G',
 'MCCONNELL MICHAEL S',
 'PIRO JIM',
 'DELAINEY DAVID W',
 'SULLIVAN-SHAKLOVITZ COLLEEN',
 'WROBEL BRUCE',
 'LINDHOLM TOD A',
 'MEYER JEROME J',
 'LAY KENNETH L',
 'BUTTS ROBERT H',
 'OLSON CINDY K',
 'MCDONALD REBECCA',
 'CUMBERLAND MICHAEL S',
 'GAHN ROBERT S',
 'MCCLELLAN GEORGE',
 'HERMANN ROBERT J',
 'SCRIMSHAW MATTHEW',
 'GATHMANN WILLIAM D',
 'HAEDICKE MARK E',
 'BOWEN JR RAYMOND M',
 'GILLIS JOHN',
 'FITZGERALD JAY L',
 'MORAN MICHAEL P',
 'REDMOND BRIAN L',
 'BAZELIDES PHILIP J',
 'BELDEN TIMOTHY N',
 'DURAN WILLIAM D',
 'THORN TERENCE H',
 'FASTOW ANDREW S',
 'FOY JOE',
 'CALGER CHRISTOPHER F',
 'RICE KENNETH D',
 'KAMINSKI WINCENTY J',
 'LOCKHART EUGENE E',
 'COX DAVID',
 'OVERDYKE JR JERE C',
 'PEREIRA PAULO V. FERRAZ',
 'STABLER FRANK',
 'SKILLING JEFFREY K',
 'BLAKE JR. NORMAN P',
 'SHERRICK JEFFREY B',
 'PRENTICE JAMES',
 'GRAY RODNEY',
 'PICKERING MARK R',
 'THE TRAVEL AGENCY IN THE PARK',
 'NOLES JAMES L',
 'KEAN STEVEN J',
 'TOTAL',
 'FOWLER PEGGY',
 'WASAFF GEORGE',
 'WHITE JR THOMAS E',
 'CHRISTODOULOU DIOMEDES',
 'ALLEN PHILLIP K',
 'SHARP VICTORIA T',
 'JAEDICKE ROBERT',
 'WINOKUR JR. HERBERT S',
 'BROWN MICHAEL',
 'BADUM JAMES P',
 'HUGHES JAMES A',
 'REYNOLDS LAWRENCE',
 'DIMICHELE RICHARD G',
 'BHATNAGAR SANJAY',
 'CARTER REBECCA C',
 'BUCHANAN HAROLD G',
 'YEAP SOON',
 'MURRAY JULIA H',
 'GARLAND C KEVIN',
 'DODSON KEITH',
 'YEAGER F SCOTT',
 'HIRKO JOSEPH',
 'DIETRICH JANET R',
 'DERRICK JR. JAMES V',
 'FREVERT MARK A',
 'PAI LOU L',
 'BAY FRANKLIN R',
 'HAYSLETT RODERICK J',
 'FUGH JOHN L',
 'FALLON JAMES B',
 'KOENIG MARK E',
 'SAVAGE FRANK',
 'IZZO LAWRENCE L',
 'TILNEY ELIZABETH A',
 'MARTIN AMANDA K',
 'BUY RICHARD B',
 'GRAMM WENDY L',
 'CAUSEY RICHARD A',
 'TAYLOR MITCHELL S',
 'DONAHUE JR JEFFREY M',
 'GLISAN JR BEN F']
In [4]:
    
expenses = map(lambda (x, y): (x,y['expenses']),data_dict.items())
expenses.sort(cmp = lambda (_1,expense1),(_2,expense2): cmp(expense1,expense2))
    
In [5]:
    
expenses
    
    Out[5]:
[('MENDELSOHN JOHN', 148),
 ('HAUG DAVID L', 475),
 ('BUCHANAN HAROLD G', 600),
 ('BLAKE JR. NORMAN P', 1279),
 ('WINOKUR JR. HERBERT S', 1413),
 ('MEYER JEROME J', 2151),
 ('DIETRICH JANET R', 3475),
 ('BADUM JAMES P', 3486),
 ('HUMPHREY GENE E', 4994),
 ('KITCHEN LOUISE', 5774),
 ('MARTIN AMANDA K', 8211),
 ('REYNOLDS LAWRENCE', 8409),
 ('BUTTS ROBERT H', 9410),
 ('JACKSON CHARLENE R', 10181),
 ('BAXTER JOHN C', 11200),
 ('BERBERIAN DAVID', 11892),
 ('ALLEN PHILLIP K', 13868),
 ('REDMOND BRIAN L', 14689),
 ('COLWELL WESLEY', 16514),
 ('STABLER FRANK', 16514),
 ('BELDEN TIMOTHY N', 17355),
 ('OVERDYKE JR JERE C', 18834),
 ('ECHOLS JOHN B', 21530),
 ('CUMBERLAND MICHAEL S', 22344),
 ('SHELBY REX', 22884),
 ('FITZGERALD JAY L', 23870),
 ('DURAN WILLIAM D', 25785),
 ('COX DAVID', 27861),
 ('PEREIRA PAULO V. FERRAZ', 27942),
 ('IZZO LAWRENCE L', 28093),
 ('DODSON KEITH', 28164),
 ('SKILLING JEFFREY K', 29336),
 ('CAUSEY RICHARD A', 30674),
 ('PICKERING MARK R', 31653),
 ('PAI LOU L', 32047),
 ('RIEKER PAULA H', 33271),
 ('WALTERS GARETH W', 33785),
 ('HANNON KEVIN P', 34039),
 ('MORDAUNT KRISTINA M', 35018),
 ('DIMICHELE RICHARD G', 35812),
 ('CALGER CHRISTOPHER F', 35818),
 ('BECK SALLY W', 37172),
 ('BIBI PHILIPPE A', 38559),
 ('DEFFNER JOSEPH M', 41626),
 ('KEAN STEVEN J', 41953),
 ('PIPER GREGORY F', 43057),
 ('THORN TERENCE H', 46145),
 ('RICE KENNETH D', 46950),
 ('HERMANN ROBERT J', 48357),
 ('GARLAND C KEVIN', 48405),
 ('BROWN MICHAEL', 49288),
 ('LAVORATO JOHN J', 49537),
 ('GAHN ROBERT S', 50080),
 ('WALLS JR ROBERT H', 50936),
 ('DERRICK JR. JAMES V', 51124),
 ('WESTFAHL RICHARD K', 51870),
 ('DETMERING TIMOTHY J', 52255),
 ('UMANOFF ADAM S', 53122),
 ('YEAGER F SCOTT', 53947),
 ('YEAP SOON', 55097),
 ('FASTOW ANDREW S', 55921),
 ('BANNANTINE JAMES M', 56301),
 ('MURRAY JULIA H', 57580),
 ('LINDHOLM TOD A', 57727),
 ('WHALLEY LAWRENCE G', 57838),
 ('BERGSIEKER RICHARD P', 59175),
 ('OLSON CINDY K', 63791),
 ('BOWEN JR RAYMOND M', 65907),
 ('HAEDICKE MARK E', 76169),
 ('HIRKO JOSEPH', 77978),
 ('ELLIOTT STEVEN', 78552),
 ('WHITE JR THOMAS E', 81353),
 ('MCCONNELL MICHAEL S', 81364),
 ('KAMINSKI WINCENTY J', 83585),
 ('BLACHMAN JEREMY M', 84208),
 ('DELAINEY DAVID W', 86174),
 ('FREVERT MARK A', 86987),
 ('METTS MARK', 94299),
 ('FALLON JAMES B', 95924),
 ('DONAHUE JR JEFFREY M', 96268),
 ('HICKERSON GARY J', 98849),
 ('LAY KENNETH L', 99832),
 ('WAKEHAM JOHN', 103773),
 ('KISHKILL JOSEPH G', 116335),
 ('SHARP VICTORIA T', 116337),
 ('KOPPER MICHAEL J', 118134),
 ('GLISAN JR BEN F', 125978),
 ('KOENIG MARK E', 127017),
 ('BAY FRANKLIN R', 129142),
 ('MCMAHON JEFFREY', 137108),
 ('SHAPIRO RICHARD S', 137767),
 ('SHANKMAN JEFFREY A', 178979),
 ('URQUHART JOHN A', 228656),
 ('MCCLELLAN GEORGE', 228763),
 ('TOTAL', 5235198),
 ('CORDES WILLIAM R', 'NaN'),
 ('MEYER ROCKFORD G', 'NaN'),
 ('HORTON STANLEY C', 'NaN'),
 ('SUNDE MARTIN', 'NaN'),
 ('GIBBS DANA R', 'NaN'),
 ('LOWRY CHARLES P', 'NaN'),
 ('MULLER MARK S', 'NaN'),
 ('CHAN RONNIE', 'NaN'),
 ('BELFER ROBERT', 'NaN'),
 ('WODRASKA JOHN', 'NaN'),
 ('WHALEY DAVID A', 'NaN'),
 ('CLINE KENNETH W', 'NaN'),
 ('LEWIS RICHARD', 'NaN'),
 ('HAYES ROBERT E', 'NaN'),
 ('MCCARTY DANNY J', 'NaN'),
 ('LEFF DANIEL P', 'NaN'),
 ('POWERS WILLIAM', 'NaN'),
 ('GOLD JOSEPH', 'NaN'),
 ('DUNCAN JOHN H', 'NaN'),
 ('SHERRIFF JOHN R', 'NaN'),
 ('LEMAISTRE CHARLES', 'NaN'),
 ('PIRO JIM', 'NaN'),
 ('SULLIVAN-SHAKLOVITZ COLLEEN', 'NaN'),
 ('WROBEL BRUCE', 'NaN'),
 ('MCDONALD REBECCA', 'NaN'),
 ('SCRIMSHAW MATTHEW', 'NaN'),
 ('GATHMANN WILLIAM D', 'NaN'),
 ('GILLIS JOHN', 'NaN'),
 ('MORAN MICHAEL P', 'NaN'),
 ('BAZELIDES PHILIP J', 'NaN'),
 ('FOY JOE', 'NaN'),
 ('LOCKHART EUGENE E', 'NaN'),
 ('SHERRICK JEFFREY B', 'NaN'),
 ('PRENTICE JAMES', 'NaN'),
 ('GRAY RODNEY', 'NaN'),
 ('THE TRAVEL AGENCY IN THE PARK', 'NaN'),
 ('NOLES JAMES L', 'NaN'),
 ('FOWLER PEGGY', 'NaN'),
 ('WASAFF GEORGE', 'NaN'),
 ('CHRISTODOULOU DIOMEDES', 'NaN'),
 ('JAEDICKE ROBERT', 'NaN'),
 ('HUGHES JAMES A', 'NaN'),
 ('BHATNAGAR SANJAY', 'NaN'),
 ('CARTER REBECCA C', 'NaN'),
 ('HAYSLETT RODERICK J', 'NaN'),
 ('FUGH JOHN L', 'NaN'),
 ('SAVAGE FRANK', 'NaN'),
 ('TILNEY ELIZABETH A', 'NaN'),
 ('BUY RICHARD B', 'NaN'),
 ('GRAMM WENDY L', 'NaN'),
 ('TAYLOR MITCHELL S', 'NaN')]
In [6]:
    
(people, values) = zip(*expenses)
plt.scatter(range(len(values)),values)
    
    Out[6]:
<matplotlib.collections.PathCollection at 0x10d6063d0>
    
 
There is an outlier: TOTAL. This certainly a column for totals. Let's remove it before proceeding.
In [7]:
    
del data_dict['TOTAL']
    
In [44]:
    
df = pandas.DataFrame.from_dict(data_dict, orient='index')
    
In [45]:
    
df.head()
    
    Out[45]:
  
    
       
      salary 
      to_messages 
      deferral_payments 
      total_payments 
      exercised_stock_options 
      bonus 
      restricted_stock 
      shared_receipt_with_poi 
      restricted_stock_deferred 
      total_stock_value 
      ... 
      loan_advances 
      from_messages 
      other 
      from_this_person_to_poi 
      poi 
      director_fees 
      deferred_income 
      long_term_incentive 
      email_address 
      from_poi_to_this_person 
     
  
  
    
      ALLEN PHILLIP K 
      201955 
      2902 
      2869717 
      4484442 
      1729541 
      4175000 
      126027 
      1407 
      -126027 
      1729541 
      ... 
      NaN 
      2195 
      152 
      65 
      False 
      NaN 
      -3081055 
      304805 
      phillip.allen@enron.com 
      47 
     
    
      BADUM JAMES P 
      NaN 
      NaN 
      178980 
      182466 
      257817 
      NaN 
      NaN 
      NaN 
      NaN 
      257817 
      ... 
      NaN 
      NaN 
      NaN 
      NaN 
      False 
      NaN 
      NaN 
      NaN 
      NaN 
      NaN 
     
    
      BANNANTINE JAMES M 
      477 
      566 
      NaN 
      916197 
      4046157 
      NaN 
      1757552 
      465 
      -560222 
      5243487 
      ... 
      NaN 
      29 
      864523 
      0 
      False 
      NaN 
      -5104 
      NaN 
      james.bannantine@enron.com 
      39 
     
    
      BAXTER JOHN C 
      267102 
      NaN 
      1295738 
      5634343 
      6680544 
      1200000 
      3942714 
      NaN 
      NaN 
      10623258 
      ... 
      NaN 
      NaN 
      2660303 
      NaN 
      False 
      NaN 
      -1386055 
      1586055 
      NaN 
      NaN 
     
    
      BAY FRANKLIN R 
      239671 
      NaN 
      260455 
      827696 
      NaN 
      400000 
      145796 
      NaN 
      -82782 
      63014 
      ... 
      NaN 
      NaN 
      69 
      NaN 
      False 
      NaN 
      -201641 
      NaN 
      frank.bay@enron.com 
      NaN 
     
  
5 rows × 21 columns
In [13]:
    
print "Dataset size: %d rows x %d columns"%df.shape
    
    
Dataset size: 145 rows x 21 columns
In [52]:
    
df.dtypes
    
    Out[52]:
salary                       object
to_messages                  object
deferral_payments            object
total_payments               object
exercised_stock_options      object
bonus                        object
restricted_stock             object
shared_receipt_with_poi      object
restricted_stock_deferred    object
total_stock_value            object
expenses                     object
loan_advances                object
from_messages                object
other                        object
from_this_person_to_poi      object
poi                            bool
director_fees                object
deferred_income              object
long_term_incentive          object
email_address                object
from_poi_to_this_person      object
dtype: object
In [56]:
    
print "Feature | Missing values"
print "---|---"
for column in df.columns:
    if column != 'poi':
        print "%s | %d"%(column,(df[column] == 'NaN').sum())
    
    
Feature | Missing values
---|---
salary | 51
to_messages | 59
deferral_payments | 107
total_payments | 21
exercised_stock_options | 44
bonus | 64
restricted_stock | 36
shared_receipt_with_poi | 59
restricted_stock_deferred | 128
total_stock_value | 20
expenses | 51
loan_advances | 142
from_messages | 59
other | 53
from_this_person_to_poi | 59
director_fees | 129
deferred_income | 97
long_term_incentive | 80
email_address | 34
from_poi_to_this_person | 59
In [83]:
    
df['poi'].hist( figsize=(5,3))
plt.xticks(np.array([0.05,0.95]), ['Non POI', 'POI'], rotation='horizontal')
plt.tick_params(bottom='on',top='off', right='off', left='on')
    
    
 
In [ ]:
    
    
In [19]:
    
df['expenses'] = df['expenses'].astype('float')
df['salary'] = df['salary'].astype('float')
df['from_this_person_to_poi'] = df['from_this_person_to_poi'].astype('float')
df['from_poi_to_this_person'] = df['from_poi_to_this_person'].astype('float')
    
In [20]:
    
df['expenses'] = df['expenses'].astype('float')
df['expenses'].hist(bins=100)
plt.figure()
df['expenses'].hist(bins=50)
plt.figure()
df['expenses'].hist(bins=20)
    
    Out[20]:
<matplotlib.axes._subplots.AxesSubplot at 0x10dde7cd0>
    
 
    
 
    
 
We can see that there are three employees spend considerably more than others.
In [21]:
    
df[df['expenses']>150000]
    
    Out[21]:
  
    
       
      salary 
      to_messages 
      deferral_payments 
      total_payments 
      exercised_stock_options 
      bonus 
      restricted_stock 
      shared_receipt_with_poi 
      restricted_stock_deferred 
      total_stock_value 
      ... 
      loan_advances 
      from_messages 
      other 
      from_this_person_to_poi 
      poi 
      director_fees 
      deferred_income 
      long_term_incentive 
      email_address 
      from_poi_to_this_person 
     
  
  
    
      MCCLELLAN GEORGE 
      263413 
      1744 
      NaN 
      1318763 
      506765 
      900000 
      441096 
      1469 
      NaN 
      947861 
      ... 
      NaN 
      49 
      51587 
      0 
      False 
      NaN 
      -125000 
      NaN 
      george.mcclellan@enron.com 
      52 
     
    
      SHANKMAN JEFFREY A 
      304110 
      3221 
      NaN 
      3038702 
      1441898 
      2000000 
      630137 
      1730 
      NaN 
      2072035 
      ... 
      NaN 
      2681 
      1191 
      83 
      False 
      NaN 
      NaN 
      554422 
      jeffrey.shankman@enron.com 
      94 
     
    
      URQUHART JOHN A 
      NaN 
      NaN 
      NaN 
      228656 
      NaN 
      NaN 
      NaN 
      NaN 
      NaN 
      NaN 
      ... 
      NaN 
      NaN 
      NaN 
      NaN 
      False 
      36666 
      -36666 
      NaN 
      NaN 
      NaN 
     
  
3 rows × 21 columns
In [22]:
    
df['salary'] = df['salary'].astype('float')
df['salary'].hist(bins=100)
plt.figure()
df['salary'].hist(bins=50)
plt.figure()
df['salary'].hist(bins=20)
    
    Out[22]:
<matplotlib.axes._subplots.AxesSubplot at 0x10e6cad10>
    
 
    
 
    
 
There are four people with a considerably higher salary than other employees (>\$600K).
In [23]:
    
df[df['salary']>600000]
    
    Out[23]:
  
    
       
      salary 
      to_messages 
      deferral_payments 
      total_payments 
      exercised_stock_options 
      bonus 
      restricted_stock 
      shared_receipt_with_poi 
      restricted_stock_deferred 
      total_stock_value 
      ... 
      loan_advances 
      from_messages 
      other 
      from_this_person_to_poi 
      poi 
      director_fees 
      deferred_income 
      long_term_incentive 
      email_address 
      from_poi_to_this_person 
     
  
  
    
      FREVERT MARK A 
      1060932 
      3275 
      6426990 
      17252530 
      10433518 
      2000000 
      4188667 
      2979 
      NaN 
      14622185 
      ... 
      2000000 
      21 
      7427621 
      6 
      False 
      NaN 
      -3367011 
      1617011 
      mark.frevert@enron.com 
      242 
     
    
      LAY KENNETH L 
      1072321 
      4273 
      202911 
      103559793 
      34348384 
      7000000 
      14761694 
      2411 
      NaN 
      49110078 
      ... 
      81525000 
      36 
      10359729 
      16 
      True 
      NaN 
      -300000 
      3600000 
      kenneth.lay@enron.com 
      123 
     
    
      PICKERING MARK R 
      655037 
      898 
      NaN 
      1386690 
      28798 
      300000 
      NaN 
      728 
      NaN 
      28798 
      ... 
      400000 
      67 
      NaN 
      0 
      False 
      NaN 
      NaN 
      NaN 
      mark.pickering@enron.com 
      7 
     
    
      SKILLING JEFFREY K 
      1111258 
      3627 
      NaN 
      8682716 
      19250000 
      5600000 
      6843672 
      2042 
      NaN 
      26093672 
      ... 
      NaN 
      108 
      22122 
      30 
      True 
      NaN 
      NaN 
      1920000 
      jeff.skilling@enron.com 
      88 
     
  
4 rows × 21 columns
Top salary employees are not the same as top expenses employees.
In [25]:
    
df[['from_this_person_to_poi','from_poi_to_this_person']].hist(bins=20)
    
    Out[25]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x10ee66310>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x10e6feed0>]], dtype=object)
    
 
In [26]:
    
df[df['from_this_person_to_poi']>280]
    
    Out[26]:
  
    
       
      salary 
      to_messages 
      deferral_payments 
      total_payments 
      exercised_stock_options 
      bonus 
      restricted_stock 
      shared_receipt_with_poi 
      restricted_stock_deferred 
      total_stock_value 
      ... 
      loan_advances 
      from_messages 
      other 
      from_this_person_to_poi 
      poi 
      director_fees 
      deferred_income 
      long_term_incentive 
      email_address 
      from_poi_to_this_person 
     
  
  
    
      BECK SALLY W 
      231330 
      7315 
      NaN 
      969068 
      NaN 
      700000 
      126027 
      2639 
      NaN 
      126027 
      ... 
      NaN 
      4343 
      566 
      386 
      False 
      NaN 
      NaN 
      NaN 
      sally.beck@enron.com 
      144 
     
    
      DELAINEY DAVID W 
      365163 
      3093 
      NaN 
      4747979 
      2291113 
      3000000 
      1323148 
      2097 
      NaN 
      3614261 
      ... 
      NaN 
      3069 
      1661 
      609 
      True 
      NaN 
      NaN 
      1294981 
      david.delainey@enron.com 
      66 
     
    
      KEAN STEVEN J 
      404338 
      12754 
      NaN 
      1747522 
      2022048 
      1000000 
      4131594 
      3639 
      NaN 
      6153642 
      ... 
      NaN 
      6759 
      1231 
      387 
      False 
      NaN 
      NaN 
      300000 
      steven.kean@enron.com 
      140 
     
    
      LAVORATO JOHN J 
      339288 
      7259 
      NaN 
      10425757 
      4158995 
      8000000 
      1008149 
      3962 
      NaN 
      5167144 
      ... 
      NaN 
      2585 
      1552 
      411 
      False 
      NaN 
      NaN 
      2035380 
      john.lavorato@enron.com 
      528 
     
  
4 rows × 21 columns
In [27]:
    
df[df['from_poi_to_this_person']>300]
    
    Out[27]:
  
    
       
      salary 
      to_messages 
      deferral_payments 
      total_payments 
      exercised_stock_options 
      bonus 
      restricted_stock 
      shared_receipt_with_poi 
      restricted_stock_deferred 
      total_stock_value 
      ... 
      loan_advances 
      from_messages 
      other 
      from_this_person_to_poi 
      poi 
      director_fees 
      deferred_income 
      long_term_incentive 
      email_address 
      from_poi_to_this_person 
     
  
  
    
      DIETRICH JANET R 
      250100 
      2572 
      NaN 
      1410464 
      1550019 
      600000 
      315068 
      1902 
      NaN 
      1865087 
      ... 
      NaN 
      63 
      473 
      14 
      False 
      NaN 
      NaN 
      556416 
      janet.dietrich@enron.com 
      305 
     
    
      LAVORATO JOHN J 
      339288 
      7259 
      NaN 
      10425757 
      4158995 
      8000000 
      1008149 
      3962 
      NaN 
      5167144 
      ... 
      NaN 
      2585 
      1552 
      411 
      False 
      NaN 
      NaN 
      2035380 
      john.lavorato@enron.com 
      528 
     
  
2 rows × 21 columns
In [28]:
    
df[['from_this_person_to_poi','from_poi_to_this_person']].sort('from_poi_to_this_person').plot()
    
    
/Users/luiscruz/dev/udacity_data_analyst/venv/lib/python2.7/site-packages/ipykernel/__main__.py:1: FutureWarning: sort(columns=....) is deprecated, use sort_values(by=.....)
  if __name__ == '__main__':
    Out[28]:
<matplotlib.axes._subplots.AxesSubplot at 0x10eac0690>
    
 
High 'from_this_person_to_poi' does not necessarily mean high 'from_poi_to_this_person', so both variables should evaluated.
In [33]:
    
df['bonus'] = df['bonus'].astype('float')
    
In [37]:
    
df[['salary','bonus']].plot(kind='scatter', x='salary', y='bonus')
    
    Out[37]:
<matplotlib.axes._subplots.AxesSubplot at 0x10ded8690>
    
 
Perhaps makes sense combining salary with bonus. A new feature could be salary+bonus
In [43]:
    
df['salary+bonus']=df['salary']+df['bonus']
    
In [44]:
    
list(df.columns)
    
    Out[44]:
['salary',
 'to_messages',
 'deferral_payments',
 'total_payments',
 'exercised_stock_options',
 'bonus',
 'restricted_stock',
 'shared_receipt_with_poi',
 'restricted_stock_deferred',
 'total_stock_value',
 'expenses',
 'loan_advances',
 'from_messages',
 'other',
 'from_this_person_to_poi',
 'poi',
 'director_fees',
 'deferred_income',
 'long_term_incentive',
 'email_address',
 'from_poi_to_this_person',
 'salary_bonus',
 'salary+bonus']
In [53]:
    
1+np.nan
    
    Out[53]:
nan
In [76]:
    
for _,obj in data_dict.items():
    salary_bonus_ratio = np.float(obj['bonus'])/np.float(obj['salary'])
    if np.isnan(salary_bonus_ratio):
        salary_bonus_ratio = -1
    obj['salary_bonus_ratio'] = salary_bonus_ratio
    
In [77]:
    
data_dict.items()
    
    Out[77]:
[('METTS MARK',
  {'bonus': 600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'mark.metts@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 94299,
   'from_messages': 29,
   'from_poi_to_this_person': 38,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1740,
   'poi': False,
   'restricted_stock': 585062,
   'restricted_stock_deferred': 'NaN',
   'salary': 365788,
   'salary+bonus': 965788.0,
   'salary_bonus_ratio': 1.6402943781644013,
   'shared_receipt_with_poi': 702,
   'to_messages': 807,
   'total_payments': 1061827,
   'total_stock_value': 585062}),
 ('BAXTER JOHN C',
  {'bonus': 1200000,
   'deferral_payments': 1295738,
   'deferred_income': -1386055,
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 6680544,
   'expenses': 11200,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 1586055,
   'other': 2660303,
   'poi': False,
   'restricted_stock': 3942714,
   'restricted_stock_deferred': 'NaN',
   'salary': 267102,
   'salary+bonus': 1467102.0,
   'salary_bonus_ratio': 4.492665723206865,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 5634343,
   'total_stock_value': 10623258}),
 ('ELLIOTT STEVEN',
  {'bonus': 350000,
   'deferral_payments': 'NaN',
   'deferred_income': -400729,
   'director_fees': 'NaN',
   'email_address': 'steven.elliott@enron.com',
   'exercised_stock_options': 4890344,
   'expenses': 78552,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 12961,
   'poi': False,
   'restricted_stock': 1788391,
   'restricted_stock_deferred': 'NaN',
   'salary': 170941,
   'salary+bonus': 520941.0,
   'salary_bonus_ratio': 2.047490069673162,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 211725,
   'total_stock_value': 6678735}),
 ('CORDES WILLIAM R',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'bill.cordes@enron.com',
   'exercised_stock_options': 651850,
   'expenses': 'NaN',
   'from_messages': 12,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 386335,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 58,
   'to_messages': 764,
   'total_payments': 'NaN',
   'total_stock_value': 1038185}),
 ('HANNON KEVIN P',
  {'bonus': 1500000,
   'deferral_payments': 'NaN',
   'deferred_income': -3117011,
   'director_fees': 'NaN',
   'email_address': 'kevin.hannon@enron.com',
   'exercised_stock_options': 5538001,
   'expenses': 34039,
   'from_messages': 32,
   'from_poi_to_this_person': 32,
   'from_this_person_to_poi': 21,
   'loan_advances': 'NaN',
   'long_term_incentive': 1617011,
   'other': 11350,
   'poi': True,
   'restricted_stock': 853064,
   'restricted_stock_deferred': 'NaN',
   'salary': 243293,
   'salary+bonus': 1743293.0,
   'salary_bonus_ratio': 6.165405498719651,
   'shared_receipt_with_poi': 1035,
   'to_messages': 1045,
   'total_payments': 288682,
   'total_stock_value': 6391065}),
 ('MORDAUNT KRISTINA M',
  {'bonus': 325000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'kristina.mordaunt@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 35018,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1411,
   'poi': False,
   'restricted_stock': 208510,
   'restricted_stock_deferred': 'NaN',
   'salary': 267093,
   'salary+bonus': 592093.0,
   'salary_bonus_ratio': 1.2168046335920448,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 628522,
   'total_stock_value': 208510}),
 ('MEYER ROCKFORD G',
  {'bonus': 'NaN',
   'deferral_payments': 1848227,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'rockford.meyer@enron.com',
   'exercised_stock_options': 493489,
   'expenses': 'NaN',
   'from_messages': 28,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 462384,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 22,
   'to_messages': 232,
   'total_payments': 1848227,
   'total_stock_value': 955873}),
 ('MCMAHON JEFFREY',
  {'bonus': 2600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jeffrey.mcmahon@enron.com',
   'exercised_stock_options': 1104054,
   'expenses': 137108,
   'from_messages': 48,
   'from_poi_to_this_person': 58,
   'from_this_person_to_poi': 26,
   'loan_advances': 'NaN',
   'long_term_incentive': 694862,
   'other': 297353,
   'poi': False,
   'restricted_stock': 558801,
   'restricted_stock_deferred': 'NaN',
   'salary': 370448,
   'salary+bonus': 2970448.0,
   'salary_bonus_ratio': 7.018528916339135,
   'shared_receipt_with_poi': 2228,
   'to_messages': 2355,
   'total_payments': 4099771,
   'total_stock_value': 1662855}),
 ('HORTON STANLEY C',
  {'bonus': 'NaN',
   'deferral_payments': 3131860,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'stanley.horton@enron.com',
   'exercised_stock_options': 5210569,
   'expenses': 'NaN',
   'from_messages': 1073,
   'from_poi_to_this_person': 44,
   'from_this_person_to_poi': 15,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 2046079,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 1074,
   'to_messages': 2350,
   'total_payments': 3131860,
   'total_stock_value': 7256648}),
 ('PIPER GREGORY F',
  {'bonus': 400000,
   'deferral_payments': 1130036,
   'deferred_income': -33333,
   'director_fees': 'NaN',
   'email_address': 'greg.piper@enron.com',
   'exercised_stock_options': 880290,
   'expenses': 43057,
   'from_messages': 222,
   'from_poi_to_this_person': 61,
   'from_this_person_to_poi': 48,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 778,
   'poi': False,
   'restricted_stock': 409554,
   'restricted_stock_deferred': -409554,
   'salary': 197091,
   'salary+bonus': 597091.0,
   'salary_bonus_ratio': 2.0295193590777862,
   'shared_receipt_with_poi': 742,
   'to_messages': 1238,
   'total_payments': 1737629,
   'total_stock_value': 880290}),
 ('HUMPHREY GENE E',
  {'bonus': 'NaN',
   'deferral_payments': 2964506,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'gene.humphrey@enron.com',
   'exercised_stock_options': 2282768,
   'expenses': 4994,
   'from_messages': 17,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 17,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 130724,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 119,
   'to_messages': 128,
   'total_payments': 3100224,
   'total_stock_value': 2282768}),
 ('UMANOFF ADAM S',
  {'bonus': 788750,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'adam.umanoff@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 53122,
   'from_messages': 18,
   'from_poi_to_this_person': 12,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 288589,
   'salary+bonus': 1077339.0,
   'salary_bonus_ratio': 2.7331256562100426,
   'shared_receipt_with_poi': 41,
   'to_messages': 111,
   'total_payments': 1130461,
   'total_stock_value': 'NaN'}),
 ('BLACHMAN JEREMY M',
  {'bonus': 850000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jeremy.blachman@enron.com',
   'exercised_stock_options': 765313,
   'expenses': 84208,
   'from_messages': 14,
   'from_poi_to_this_person': 25,
   'from_this_person_to_poi': 2,
   'loan_advances': 'NaN',
   'long_term_incentive': 831809,
   'other': 272,
   'poi': False,
   'restricted_stock': 189041,
   'restricted_stock_deferred': 'NaN',
   'salary': 248546,
   'salary+bonus': 1098546.0,
   'salary_bonus_ratio': 3.419890080709406,
   'shared_receipt_with_poi': 2326,
   'to_messages': 2475,
   'total_payments': 2014835,
   'total_stock_value': 954354}),
 ('SUNDE MARTIN',
  {'bonus': 700000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'marty.sunde@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 38,
   'from_poi_to_this_person': 37,
   'from_this_person_to_poi': 13,
   'loan_advances': 'NaN',
   'long_term_incentive': 476451,
   'other': 111122,
   'poi': False,
   'restricted_stock': 698920,
   'restricted_stock_deferred': 'NaN',
   'salary': 257486,
   'salary+bonus': 957486.0,
   'salary_bonus_ratio': 2.7185944090164127,
   'shared_receipt_with_poi': 2565,
   'to_messages': 2647,
   'total_payments': 1545059,
   'total_stock_value': 698920}),
 ('GIBBS DANA R',
  {'bonus': 'NaN',
   'deferral_payments': 504610,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'dana.gibbs@enron.com',
   'exercised_stock_options': 2218275,
   'expenses': 'NaN',
   'from_messages': 12,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 461912,
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 23,
   'to_messages': 169,
   'total_payments': 966522,
   'total_stock_value': 2218275}),
 ('LOWRY CHARLES P',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 372205,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 153686,
   'restricted_stock_deferred': -153686,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 372205}),
 ('COLWELL WESLEY',
  {'bonus': 1200000,
   'deferral_payments': 27610,
   'deferred_income': -144062,
   'director_fees': 'NaN',
   'email_address': 'wes.colwell@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 16514,
   'from_messages': 40,
   'from_poi_to_this_person': 240,
   'from_this_person_to_poi': 11,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 101740,
   'poi': True,
   'restricted_stock': 698242,
   'restricted_stock_deferred': 'NaN',
   'salary': 288542,
   'salary+bonus': 1488542.0,
   'salary_bonus_ratio': 4.158839960906905,
   'shared_receipt_with_poi': 1132,
   'to_messages': 1758,
   'total_payments': 1490344,
   'total_stock_value': 698242}),
 ('MULLER MARK S',
  {'bonus': 1100000,
   'deferral_payments': 842924,
   'deferred_income': -719000,
   'director_fees': 'NaN',
   'email_address': 's..muller@enron.com',
   'exercised_stock_options': 1056320,
   'expenses': 'NaN',
   'from_messages': 16,
   'from_poi_to_this_person': 12,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 1725545,
   'other': 947,
   'poi': False,
   'restricted_stock': 360528,
   'restricted_stock_deferred': 'NaN',
   'salary': 251654,
   'salary+bonus': 1351654.0,
   'salary_bonus_ratio': 4.3710809285765375,
   'shared_receipt_with_poi': 114,
   'to_messages': 136,
   'total_payments': 3202070,
   'total_stock_value': 1416848}),
 ('JACKSON CHARLENE R',
  {'bonus': 250000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'charlene.jackson@enron.com',
   'exercised_stock_options': 185063,
   'expenses': 10181,
   'from_messages': 56,
   'from_poi_to_this_person': 25,
   'from_this_person_to_poi': 19,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 2435,
   'poi': False,
   'restricted_stock': 540672,
   'restricted_stock_deferred': 'NaN',
   'salary': 288558,
   'salary+bonus': 538558.0,
   'salary_bonus_ratio': 0.8663769502145149,
   'shared_receipt_with_poi': 117,
   'to_messages': 258,
   'total_payments': 551174,
   'total_stock_value': 725735}),
 ('WESTFAHL RICHARD K',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -10800,
   'director_fees': 'NaN',
   'email_address': 'dick.westfahl@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 51870,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 256191,
   'other': 401130,
   'poi': False,
   'restricted_stock': 384930,
   'restricted_stock_deferred': 'NaN',
   'salary': 63744,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 762135,
   'total_stock_value': 384930}),
 ('WALTERS GARETH W',
  {'bonus': 'NaN',
   'deferral_payments': 53625,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 1030329,
   'expenses': 33785,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 87410,
   'total_stock_value': 1030329}),
 ('WALLS JR ROBERT H',
  {'bonus': 850000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'rob.walls@enron.com',
   'exercised_stock_options': 4346544,
   'expenses': 50936,
   'from_messages': 146,
   'from_poi_to_this_person': 17,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 540751,
   'other': 2,
   'poi': False,
   'restricted_stock': 1552453,
   'restricted_stock_deferred': 'NaN',
   'salary': 357091,
   'salary+bonus': 1207091.0,
   'salary_bonus_ratio': 2.380345626184922,
   'shared_receipt_with_poi': 215,
   'to_messages': 671,
   'total_payments': 1798780,
   'total_stock_value': 5898997}),
 ('KITCHEN LOUISE',
  {'bonus': 3100000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'louise.kitchen@enron.com',
   'exercised_stock_options': 81042,
   'expenses': 5774,
   'from_messages': 1728,
   'from_poi_to_this_person': 251,
   'from_this_person_to_poi': 194,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 93925,
   'poi': False,
   'restricted_stock': 466101,
   'restricted_stock_deferred': 'NaN',
   'salary': 271442,
   'salary+bonus': 3371442.0,
   'salary_bonus_ratio': 11.420487617981005,
   'shared_receipt_with_poi': 3669,
   'to_messages': 8305,
   'total_payments': 3471141,
   'total_stock_value': 547143}),
 ('CHAN RONNIE',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -98784,
   'director_fees': 98784,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 32460,
   'restricted_stock_deferred': -32460,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 'NaN'}),
 ('BELFER ROBERT',
  {'bonus': 'NaN',
   'deferral_payments': -102500,
   'deferred_income': 'NaN',
   'director_fees': 3285,
   'email_address': 'NaN',
   'exercised_stock_options': 3285,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 44093,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 102500,
   'total_stock_value': -44093}),
 ('SHANKMAN JEFFREY A',
  {'bonus': 2000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jeffrey.shankman@enron.com',
   'exercised_stock_options': 1441898,
   'expenses': 178979,
   'from_messages': 2681,
   'from_poi_to_this_person': 94,
   'from_this_person_to_poi': 83,
   'loan_advances': 'NaN',
   'long_term_incentive': 554422,
   'other': 1191,
   'poi': False,
   'restricted_stock': 630137,
   'restricted_stock_deferred': 'NaN',
   'salary': 304110,
   'salary+bonus': 2304110.0,
   'salary_bonus_ratio': 6.576567689322943,
   'shared_receipt_with_poi': 1730,
   'to_messages': 3221,
   'total_payments': 3038702,
   'total_stock_value': 2072035}),
 ('WODRASKA JOHN',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'john.wodraska@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 189583,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 189583,
   'total_stock_value': 'NaN'}),
 ('BERGSIEKER RICHARD P',
  {'bonus': 250000,
   'deferral_payments': 'NaN',
   'deferred_income': -485813,
   'director_fees': 'NaN',
   'email_address': 'rick.bergsieker@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 59175,
   'from_messages': 59,
   'from_poi_to_this_person': 4,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 180250,
   'other': 427316,
   'poi': False,
   'restricted_stock': 659249,
   'restricted_stock_deferred': 'NaN',
   'salary': 187922,
   'salary+bonus': 437922.0,
   'salary_bonus_ratio': 1.3303391832781686,
   'shared_receipt_with_poi': 233,
   'to_messages': 383,
   'total_payments': 618850,
   'total_stock_value': 659249}),
 ('URQUHART JOHN A',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -36666,
   'director_fees': 36666,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 228656,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 228656,
   'total_stock_value': 'NaN'}),
 ('BIBI PHILIPPE A',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'philippe.bibi@enron.com',
   'exercised_stock_options': 1465734,
   'expenses': 38559,
   'from_messages': 40,
   'from_poi_to_this_person': 23,
   'from_this_person_to_poi': 8,
   'loan_advances': 'NaN',
   'long_term_incentive': 369721,
   'other': 425688,
   'poi': False,
   'restricted_stock': 378082,
   'restricted_stock_deferred': 'NaN',
   'salary': 213625,
   'salary+bonus': 1213625.0,
   'salary_bonus_ratio': 4.681100058513751,
   'shared_receipt_with_poi': 1336,
   'to_messages': 1607,
   'total_payments': 2047593,
   'total_stock_value': 1843816}),
 ('RIEKER PAULA H',
  {'bonus': 700000,
   'deferral_payments': 214678,
   'deferred_income': -100000,
   'director_fees': 'NaN',
   'email_address': 'paula.rieker@enron.com',
   'exercised_stock_options': 1635238,
   'expenses': 33271,
   'from_messages': 82,
   'from_poi_to_this_person': 35,
   'from_this_person_to_poi': 48,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1950,
   'poi': True,
   'restricted_stock': 283649,
   'restricted_stock_deferred': 'NaN',
   'salary': 249201,
   'salary+bonus': 949201.0,
   'salary_bonus_ratio': 2.8089774920646384,
   'shared_receipt_with_poi': 1258,
   'to_messages': 1328,
   'total_payments': 1099100,
   'total_stock_value': 1918887}),
 ('WHALEY DAVID A',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 98718,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 98718}),
 ('BECK SALLY W',
  {'bonus': 700000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'sally.beck@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 37172,
   'from_messages': 4343,
   'from_poi_to_this_person': 144,
   'from_this_person_to_poi': 386,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 566,
   'poi': False,
   'restricted_stock': 126027,
   'restricted_stock_deferred': 'NaN',
   'salary': 231330,
   'salary+bonus': 931330.0,
   'salary_bonus_ratio': 3.025980201443825,
   'shared_receipt_with_poi': 2639,
   'to_messages': 7315,
   'total_payments': 969068,
   'total_stock_value': 126027}),
 ('HAUG DAVID L',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'david.haug@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 475,
   'from_messages': 19,
   'from_poi_to_this_person': 4,
   'from_this_person_to_poi': 7,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 2217299,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 471,
   'to_messages': 573,
   'total_payments': 475,
   'total_stock_value': 2217299}),
 ('ECHOLS JOHN B',
  {'bonus': 200000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'john.echols@enron.com',
   'exercised_stock_options': 601438,
   'expenses': 21530,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 2234774,
   'other': 53775,
   'poi': False,
   'restricted_stock': 407503,
   'restricted_stock_deferred': 'NaN',
   'salary': 182245,
   'salary+bonus': 382245.0,
   'salary_bonus_ratio': 1.0974237976350518,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2692324,
   'total_stock_value': 1008941}),
 ('MENDELSOHN JOHN',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -103750,
   'director_fees': 103750,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 148,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 148,
   'total_stock_value': 'NaN'}),
 ('HICKERSON GARY J',
  {'bonus': 1700000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'gary.hickerson@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 98849,
   'from_messages': 27,
   'from_poi_to_this_person': 40,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 69223,
   'other': 1936,
   'poi': False,
   'restricted_stock': 441096,
   'restricted_stock_deferred': 'NaN',
   'salary': 211788,
   'salary+bonus': 1911788.0,
   'salary_bonus_ratio': 8.02689481934765,
   'shared_receipt_with_poi': 900,
   'to_messages': 1320,
   'total_payments': 2081796,
   'total_stock_value': 441096}),
 ('CLINE KENNETH W',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 662086,
   'restricted_stock_deferred': -472568,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 189518}),
 ('LEWIS RICHARD',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'richard.lewis@enron.com',
   'exercised_stock_options': 850477,
   'expenses': 'NaN',
   'from_messages': 26,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 739,
   'to_messages': 952,
   'total_payments': 'NaN',
   'total_stock_value': 850477}),
 ('HAYES ROBERT E',
  {'bonus': 'NaN',
   'deferral_payments': 7961,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'robert.hayes@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 12,
   'from_poi_to_this_person': 16,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 151418,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 50,
   'to_messages': 504,
   'total_payments': 7961,
   'total_stock_value': 151418}),
 ('MCCARTY DANNY J',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'danny.mccarty@enron.com',
   'exercised_stock_options': 664375,
   'expenses': 'NaN',
   'from_messages': 215,
   'from_poi_to_this_person': 25,
   'from_this_person_to_poi': 2,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 94556,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 508,
   'to_messages': 1433,
   'total_payments': 'NaN',
   'total_stock_value': 758931}),
 ('KOPPER MICHAEL J',
  {'bonus': 800000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'michael.kopper@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 118134,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 602671,
   'other': 907502,
   'poi': True,
   'restricted_stock': 985032,
   'restricted_stock_deferred': 'NaN',
   'salary': 224305,
   'salary+bonus': 1024305.0,
   'salary_bonus_ratio': 3.5665723011078665,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2652612,
   'total_stock_value': 985032}),
 ('LEFF DANIEL P',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'dan.leff@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 63,
   'from_poi_to_this_person': 67,
   'from_this_person_to_poi': 14,
   'loan_advances': 'NaN',
   'long_term_incentive': 1387399,
   'other': 3083,
   'poi': False,
   'restricted_stock': 360528,
   'restricted_stock_deferred': 'NaN',
   'salary': 273746,
   'salary+bonus': 1273746.0,
   'salary_bonus_ratio': 3.653021414011529,
   'shared_receipt_with_poi': 2672,
   'to_messages': 2822,
   'total_payments': 2664228,
   'total_stock_value': 360528}),
 ('LAVORATO JOHN J',
  {'bonus': 8000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'john.lavorato@enron.com',
   'exercised_stock_options': 4158995,
   'expenses': 49537,
   'from_messages': 2585,
   'from_poi_to_this_person': 528,
   'from_this_person_to_poi': 411,
   'loan_advances': 'NaN',
   'long_term_incentive': 2035380,
   'other': 1552,
   'poi': False,
   'restricted_stock': 1008149,
   'restricted_stock_deferred': 'NaN',
   'salary': 339288,
   'salary+bonus': 8339288.0,
   'salary_bonus_ratio': 23.57878852184575,
   'shared_receipt_with_poi': 3962,
   'to_messages': 7259,
   'total_payments': 10425757,
   'total_stock_value': 5167144}),
 ('BERBERIAN DAVID',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'david.berberian@enron.com',
   'exercised_stock_options': 1624396,
   'expenses': 11892,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 869220,
   'restricted_stock_deferred': 'NaN',
   'salary': 216582,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 228474,
   'total_stock_value': 2493616}),
 ('DETMERING TIMOTHY J',
  {'bonus': 425000,
   'deferral_payments': 875307,
   'deferred_income': -775241,
   'director_fees': 'NaN',
   'email_address': 'timothy.detmering@enron.com',
   'exercised_stock_options': 2027865,
   'expenses': 52255,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 415657,
   'other': 1105,
   'poi': False,
   'restricted_stock': 315068,
   'restricted_stock_deferred': -315068,
   'salary': 210500,
   'salary+bonus': 635500.0,
   'salary_bonus_ratio': 2.019002375296912,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1204583,
   'total_stock_value': 2027865}),
 ('WAKEHAM JOHN',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 109298,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 103773,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 213071,
   'total_stock_value': 'NaN'}),
 ('POWERS WILLIAM',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -17500,
   'director_fees': 17500,
   'email_address': 'ken.powers@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 26,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 12,
   'to_messages': 653,
   'total_payments': 'NaN',
   'total_stock_value': 'NaN'}),
 ('GOLD JOSEPH',
  {'bonus': 750000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'joe.gold@enron.com',
   'exercised_stock_options': 436515,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 304805,
   'other': 819288,
   'poi': False,
   'restricted_stock': 441096,
   'restricted_stock_deferred': 'NaN',
   'salary': 272880,
   'salary+bonus': 1022880.0,
   'salary_bonus_ratio': 2.748460861917326,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2146973,
   'total_stock_value': 877611}),
 ('BANNANTINE JAMES M',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -5104,
   'director_fees': 'NaN',
   'email_address': 'james.bannantine@enron.com',
   'exercised_stock_options': 4046157,
   'expenses': 56301,
   'from_messages': 29,
   'from_poi_to_this_person': 39,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 864523,
   'poi': False,
   'restricted_stock': 1757552,
   'restricted_stock_deferred': -560222,
   'salary': 477,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 465,
   'to_messages': 566,
   'total_payments': 916197,
   'total_stock_value': 5243487}),
 ('DUNCAN JOHN H',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -25000,
   'director_fees': 102492,
   'email_address': 'NaN',
   'exercised_stock_options': 371750,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 77492,
   'total_stock_value': 371750}),
 ('SHAPIRO RICHARD S',
  {'bonus': 650000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'richard.shapiro@enron.com',
   'exercised_stock_options': 607837,
   'expenses': 137767,
   'from_messages': 1215,
   'from_poi_to_this_person': 74,
   'from_this_person_to_poi': 65,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 705,
   'poi': False,
   'restricted_stock': 379164,
   'restricted_stock_deferred': 'NaN',
   'salary': 269076,
   'salary+bonus': 919076.0,
   'salary_bonus_ratio': 2.4156743819590005,
   'shared_receipt_with_poi': 4527,
   'to_messages': 15149,
   'total_payments': 1057548,
   'total_stock_value': 987001}),
 ('SHERRIFF JOHN R',
  {'bonus': 1500000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'john.sherriff@enron.com',
   'exercised_stock_options': 1835558,
   'expenses': 'NaN',
   'from_messages': 92,
   'from_poi_to_this_person': 28,
   'from_this_person_to_poi': 23,
   'loan_advances': 'NaN',
   'long_term_incentive': 554422,
   'other': 1852186,
   'poi': False,
   'restricted_stock': 1293424,
   'restricted_stock_deferred': 'NaN',
   'salary': 428780,
   'salary+bonus': 1928780.0,
   'salary_bonus_ratio': 3.4982974952189934,
   'shared_receipt_with_poi': 2103,
   'to_messages': 3187,
   'total_payments': 4335388,
   'total_stock_value': 3128982}),
 ('SHELBY REX',
  {'bonus': 200000,
   'deferral_payments': 'NaN',
   'deferred_income': -4167,
   'director_fees': 'NaN',
   'email_address': 'rex.shelby@enron.com',
   'exercised_stock_options': 1624396,
   'expenses': 22884,
   'from_messages': 39,
   'from_poi_to_this_person': 13,
   'from_this_person_to_poi': 14,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1573324,
   'poi': True,
   'restricted_stock': 869220,
   'restricted_stock_deferred': 'NaN',
   'salary': 211844,
   'salary+bonus': 411844.0,
   'salary_bonus_ratio': 0.9440909348388437,
   'shared_receipt_with_poi': 91,
   'to_messages': 225,
   'total_payments': 2003885,
   'total_stock_value': 2493616}),
 ('LEMAISTRE CHARLES',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -25000,
   'director_fees': 112492,
   'email_address': 'NaN',
   'exercised_stock_options': 412878,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 87492,
   'total_stock_value': 412878}),
 ('DEFFNER JOSEPH M',
  {'bonus': 600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'joseph.deffner@enron.com',
   'exercised_stock_options': 17378,
   'expenses': 41626,
   'from_messages': 74,
   'from_poi_to_this_person': 115,
   'from_this_person_to_poi': 4,
   'loan_advances': 'NaN',
   'long_term_incentive': 335349,
   'other': 25553,
   'poi': False,
   'restricted_stock': 141833,
   'restricted_stock_deferred': 'NaN',
   'salary': 206121,
   'salary+bonus': 806121.0,
   'salary_bonus_ratio': 2.910911551952494,
   'shared_receipt_with_poi': 552,
   'to_messages': 714,
   'total_payments': 1208649,
   'total_stock_value': 159211}),
 ('KISHKILL JOSEPH G',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -51042,
   'director_fees': 'NaN',
   'email_address': 'joe.kishkill@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 116335,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 465357,
   'poi': False,
   'restricted_stock': 1034346,
   'restricted_stock_deferred': 'NaN',
   'salary': 174246,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 704896,
   'total_stock_value': 1034346}),
 ('WHALLEY LAWRENCE G',
  {'bonus': 3000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'greg.whalley@enron.com',
   'exercised_stock_options': 3282960,
   'expenses': 57838,
   'from_messages': 556,
   'from_poi_to_this_person': 186,
   'from_this_person_to_poi': 24,
   'loan_advances': 'NaN',
   'long_term_incentive': 808346,
   'other': 301026,
   'poi': False,
   'restricted_stock': 2796177,
   'restricted_stock_deferred': 'NaN',
   'salary': 510364,
   'salary+bonus': 3510364.0,
   'salary_bonus_ratio': 5.878157550297435,
   'shared_receipt_with_poi': 3920,
   'to_messages': 6019,
   'total_payments': 4677574,
   'total_stock_value': 6079137}),
 ('MCCONNELL MICHAEL S',
  {'bonus': 1100000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'mike.mcconnell@enron.com',
   'exercised_stock_options': 1623010,
   'expenses': 81364,
   'from_messages': 2742,
   'from_poi_to_this_person': 92,
   'from_this_person_to_poi': 194,
   'loan_advances': 'NaN',
   'long_term_incentive': 554422,
   'other': 540,
   'poi': False,
   'restricted_stock': 1478269,
   'restricted_stock_deferred': 'NaN',
   'salary': 365038,
   'salary+bonus': 1465038.0,
   'salary_bonus_ratio': 3.013384907872605,
   'shared_receipt_with_poi': 2189,
   'to_messages': 3329,
   'total_payments': 2101364,
   'total_stock_value': 3101279}),
 ('PIRO JIM',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jim.piro@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 16,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 47304,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 3,
   'to_messages': 58,
   'total_payments': 'NaN',
   'total_stock_value': 47304}),
 ('DELAINEY DAVID W',
  {'bonus': 3000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'david.delainey@enron.com',
   'exercised_stock_options': 2291113,
   'expenses': 86174,
   'from_messages': 3069,
   'from_poi_to_this_person': 66,
   'from_this_person_to_poi': 609,
   'loan_advances': 'NaN',
   'long_term_incentive': 1294981,
   'other': 1661,
   'poi': True,
   'restricted_stock': 1323148,
   'restricted_stock_deferred': 'NaN',
   'salary': 365163,
   'salary+bonus': 3365163.0,
   'salary_bonus_ratio': 8.215509238340138,
   'shared_receipt_with_poi': 2097,
   'to_messages': 3093,
   'total_payments': 4747979,
   'total_stock_value': 3614261}),
 ('SULLIVAN-SHAKLOVITZ COLLEEN',
  {'bonus': 100000,
   'deferral_payments': 181993,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 1362375,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 554422,
   'other': 162,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 162779,
   'salary+bonus': 262779.0,
   'salary_bonus_ratio': 0.6143298582741017,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 999356,
   'total_stock_value': 1362375}),
 ('WROBEL BRUCE',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 139130,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 139130}),
 ('LINDHOLM TOD A',
  {'bonus': 200000,
   'deferral_payments': 204075,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'tod.lindholm@enron.com',
   'exercised_stock_options': 2549361,
   'expenses': 57727,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 175000,
   'other': 2630,
   'poi': False,
   'restricted_stock': 514847,
   'restricted_stock_deferred': 'NaN',
   'salary': 236457,
   'salary+bonus': 436457.0,
   'salary_bonus_ratio': 0.8458197473536415,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 875889,
   'total_stock_value': 3064208}),
 ('MEYER JEROME J',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -38346,
   'director_fees': 38346,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 2151,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2151,
   'total_stock_value': 'NaN'}),
 ('LAY KENNETH L',
  {'bonus': 7000000,
   'deferral_payments': 202911,
   'deferred_income': -300000,
   'director_fees': 'NaN',
   'email_address': 'kenneth.lay@enron.com',
   'exercised_stock_options': 34348384,
   'expenses': 99832,
   'from_messages': 36,
   'from_poi_to_this_person': 123,
   'from_this_person_to_poi': 16,
   'loan_advances': 81525000,
   'long_term_incentive': 3600000,
   'other': 10359729,
   'poi': True,
   'restricted_stock': 14761694,
   'restricted_stock_deferred': 'NaN',
   'salary': 1072321,
   'salary+bonus': 8072321.0,
   'salary_bonus_ratio': 6.527896031132468,
   'shared_receipt_with_poi': 2411,
   'to_messages': 4273,
   'total_payments': 103559793,
   'total_stock_value': 49110078}),
 ('BUTTS ROBERT H',
  {'bonus': 750000,
   'deferral_payments': 'NaN',
   'deferred_income': -75000,
   'director_fees': 'NaN',
   'email_address': 'bob.butts@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 9410,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 175000,
   'other': 150656,
   'poi': False,
   'restricted_stock': 417619,
   'restricted_stock_deferred': 'NaN',
   'salary': 261516,
   'salary+bonus': 1011516.0,
   'salary_bonus_ratio': 2.8678933602532926,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1271582,
   'total_stock_value': 417619}),
 ('OLSON CINDY K',
  {'bonus': 750000,
   'deferral_payments': 77716,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'cindy.olson@enron.com',
   'exercised_stock_options': 1637034,
   'expenses': 63791,
   'from_messages': 52,
   'from_poi_to_this_person': 20,
   'from_this_person_to_poi': 15,
   'loan_advances': 'NaN',
   'long_term_incentive': 100000,
   'other': 972,
   'poi': False,
   'restricted_stock': 969729,
   'restricted_stock_deferred': 'NaN',
   'salary': 329078,
   'salary+bonus': 1079078.0,
   'salary_bonus_ratio': 2.279094925823057,
   'shared_receipt_with_poi': 856,
   'to_messages': 1184,
   'total_payments': 1321557,
   'total_stock_value': 2606763}),
 ('MCDONALD REBECCA',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'rebecca.mcdonald@enron.com',
   'exercised_stock_options': 757301,
   'expenses': 'NaN',
   'from_messages': 13,
   'from_poi_to_this_person': 54,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 934065,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 720,
   'to_messages': 894,
   'total_payments': 'NaN',
   'total_stock_value': 1691366}),
 ('CUMBERLAND MICHAEL S',
  {'bonus': 325000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 22344,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 275000,
   'other': 713,
   'poi': False,
   'restricted_stock': 207940,
   'restricted_stock_deferred': 'NaN',
   'salary': 184899,
   'salary+bonus': 509899.0,
   'salary_bonus_ratio': 1.7577163748857485,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 807956,
   'total_stock_value': 207940}),
 ('GAHN ROBERT S',
  {'bonus': 509870,
   'deferral_payments': 73122,
   'deferred_income': -1042,
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 83237,
   'expenses': 50080,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 76547,
   'poi': False,
   'restricted_stock': 235370,
   'restricted_stock_deferred': 'NaN',
   'salary': 192008,
   'salary+bonus': 701878.0,
   'salary_bonus_ratio': 2.6554622724053165,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 900585,
   'total_stock_value': 318607}),
 ('MCCLELLAN GEORGE',
  {'bonus': 900000,
   'deferral_payments': 'NaN',
   'deferred_income': -125000,
   'director_fees': 'NaN',
   'email_address': 'george.mcclellan@enron.com',
   'exercised_stock_options': 506765,
   'expenses': 228763,
   'from_messages': 49,
   'from_poi_to_this_person': 52,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 51587,
   'poi': False,
   'restricted_stock': 441096,
   'restricted_stock_deferred': 'NaN',
   'salary': 263413,
   'salary+bonus': 1163413.0,
   'salary_bonus_ratio': 3.4166878627858153,
   'shared_receipt_with_poi': 1469,
   'to_messages': 1744,
   'total_payments': 1318763,
   'total_stock_value': 947861}),
 ('HERMANN ROBERT J',
  {'bonus': 700000,
   'deferral_payments': 'NaN',
   'deferred_income': -280000,
   'director_fees': 'NaN',
   'email_address': 'robert.hermann@enron.com',
   'exercised_stock_options': 187500,
   'expenses': 48357,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 150000,
   'other': 416441,
   'poi': False,
   'restricted_stock': 480632,
   'restricted_stock_deferred': 'NaN',
   'salary': 262663,
   'salary+bonus': 962663.0,
   'salary_bonus_ratio': 2.665011821231007,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1297461,
   'total_stock_value': 668132}),
 ('SCRIMSHAW MATTHEW',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'matthew.scrimshaw@enron.com',
   'exercised_stock_options': 759557,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 759557}),
 ('GATHMANN WILLIAM D',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 1753766,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 264013,
   'restricted_stock_deferred': -72419,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 1945360}),
 ('HAEDICKE MARK E',
  {'bonus': 1150000,
   'deferral_payments': 2157527,
   'deferred_income': -934484,
   'director_fees': 'NaN',
   'email_address': 'mark.haedicke@enron.com',
   'exercised_stock_options': 608750,
   'expenses': 76169,
   'from_messages': 1941,
   'from_poi_to_this_person': 180,
   'from_this_person_to_poi': 61,
   'loan_advances': 'NaN',
   'long_term_incentive': 983346,
   'other': 52382,
   'poi': False,
   'restricted_stock': 524169,
   'restricted_stock_deferred': -329825,
   'salary': 374125,
   'salary+bonus': 1524125.0,
   'salary_bonus_ratio': 3.073838957567658,
   'shared_receipt_with_poi': 1847,
   'to_messages': 4009,
   'total_payments': 3859065,
   'total_stock_value': 803094}),
 ('BOWEN JR RAYMOND M',
  {'bonus': 1350000,
   'deferral_payments': 'NaN',
   'deferred_income': -833,
   'director_fees': 'NaN',
   'email_address': 'raymond.bowen@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 65907,
   'from_messages': 27,
   'from_poi_to_this_person': 140,
   'from_this_person_to_poi': 15,
   'loan_advances': 'NaN',
   'long_term_incentive': 974293,
   'other': 1621,
   'poi': True,
   'restricted_stock': 252055,
   'restricted_stock_deferred': 'NaN',
   'salary': 278601,
   'salary+bonus': 1628601.0,
   'salary_bonus_ratio': 4.845639462887786,
   'shared_receipt_with_poi': 1593,
   'to_messages': 1858,
   'total_payments': 2669589,
   'total_stock_value': 252055}),
 ('GILLIS JOHN',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 9803,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 75838,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 85641}),
 ('FITZGERALD JAY L',
  {'bonus': 350000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jay.fitzgerald@enron.com',
   'exercised_stock_options': 664461,
   'expenses': 23870,
   'from_messages': 16,
   'from_poi_to_this_person': 1,
   'from_this_person_to_poi': 8,
   'loan_advances': 'NaN',
   'long_term_incentive': 556416,
   'other': 285414,
   'poi': False,
   'restricted_stock': 956775,
   'restricted_stock_deferred': 'NaN',
   'salary': 199157,
   'salary+bonus': 549157.0,
   'salary_bonus_ratio': 1.7574074724965731,
   'shared_receipt_with_poi': 723,
   'to_messages': 936,
   'total_payments': 1414857,
   'total_stock_value': 1621236}),
 ('MORAN MICHAEL P',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'michael.moran@enron.com',
   'exercised_stock_options': 59539,
   'expenses': 'NaN',
   'from_messages': 19,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 161602,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 127,
   'to_messages': 672,
   'total_payments': 'NaN',
   'total_stock_value': 221141}),
 ('REDMOND BRIAN L',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'brian.redmond@enron.com',
   'exercised_stock_options': 7509039,
   'expenses': 14689,
   'from_messages': 221,
   'from_poi_to_this_person': 204,
   'from_this_person_to_poi': 49,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 381285,
   'restricted_stock_deferred': 'NaN',
   'salary': 96840,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 1063,
   'to_messages': 1671,
   'total_payments': 111529,
   'total_stock_value': 7890324}),
 ('BAZELIDES PHILIP J',
  {'bonus': 'NaN',
   'deferral_payments': 684694,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 1599641,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 93750,
   'other': 874,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 80818,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 860136,
   'total_stock_value': 1599641}),
 ('BELDEN TIMOTHY N',
  {'bonus': 5249999,
   'deferral_payments': 2144013,
   'deferred_income': -2334434,
   'director_fees': 'NaN',
   'email_address': 'tim.belden@enron.com',
   'exercised_stock_options': 953136,
   'expenses': 17355,
   'from_messages': 484,
   'from_poi_to_this_person': 228,
   'from_this_person_to_poi': 108,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 210698,
   'poi': True,
   'restricted_stock': 157569,
   'restricted_stock_deferred': 'NaN',
   'salary': 213999,
   'salary+bonus': 5463998.0,
   'salary_bonus_ratio': 24.532820246823583,
   'shared_receipt_with_poi': 5521,
   'to_messages': 7991,
   'total_payments': 5501630,
   'total_stock_value': 1110705}),
 ('DURAN WILLIAM D',
  {'bonus': 750000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'w.duran@enron.com',
   'exercised_stock_options': 1451869,
   'expenses': 25785,
   'from_messages': 12,
   'from_poi_to_this_person': 106,
   'from_this_person_to_poi': 3,
   'loan_advances': 'NaN',
   'long_term_incentive': 1105218,
   'other': 1568,
   'poi': False,
   'restricted_stock': 189041,
   'restricted_stock_deferred': 'NaN',
   'salary': 210692,
   'salary+bonus': 960692.0,
   'salary_bonus_ratio': 3.559698517266911,
   'shared_receipt_with_poi': 599,
   'to_messages': 904,
   'total_payments': 2093263,
   'total_stock_value': 1640910}),
 ('THORN TERENCE H',
  {'bonus': 'NaN',
   'deferral_payments': 16586,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'terence.thorn@enron.com',
   'exercised_stock_options': 4452476,
   'expenses': 46145,
   'from_messages': 41,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 200000,
   'other': 426629,
   'poi': False,
   'restricted_stock': 365320,
   'restricted_stock_deferred': 'NaN',
   'salary': 222093,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 73,
   'to_messages': 266,
   'total_payments': 911453,
   'total_stock_value': 4817796}),
 ('FASTOW ANDREW S',
  {'bonus': 1300000,
   'deferral_payments': 'NaN',
   'deferred_income': -1386055,
   'director_fees': 'NaN',
   'email_address': 'andrew.fastow@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 55921,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 1736055,
   'other': 277464,
   'poi': True,
   'restricted_stock': 1794412,
   'restricted_stock_deferred': 'NaN',
   'salary': 440698,
   'salary+bonus': 1740698.0,
   'salary_bonus_ratio': 2.949865894558178,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2424083,
   'total_stock_value': 1794412}),
 ('FOY JOE',
  {'bonus': 'NaN',
   'deferral_payments': 181755,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'tracy.foy@enron.com',
   'exercised_stock_options': 343434,
   'expenses': 'NaN',
   'from_messages': 13,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 2,
   'to_messages': 57,
   'total_payments': 181755,
   'total_stock_value': 343434}),
 ('CALGER CHRISTOPHER F',
  {'bonus': 1250000,
   'deferral_payments': 'NaN',
   'deferred_income': -262500,
   'director_fees': 'NaN',
   'email_address': 'christopher.calger@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 35818,
   'from_messages': 144,
   'from_poi_to_this_person': 199,
   'from_this_person_to_poi': 25,
   'loan_advances': 'NaN',
   'long_term_incentive': 375304,
   'other': 486,
   'poi': True,
   'restricted_stock': 126027,
   'restricted_stock_deferred': 'NaN',
   'salary': 240189,
   'salary+bonus': 1490189.0,
   'salary_bonus_ratio': 5.204234998272194,
   'shared_receipt_with_poi': 2188,
   'to_messages': 2598,
   'total_payments': 1639297,
   'total_stock_value': 126027}),
 ('RICE KENNETH D',
  {'bonus': 1750000,
   'deferral_payments': 'NaN',
   'deferred_income': -3504386,
   'director_fees': 'NaN',
   'email_address': 'ken.rice@enron.com',
   'exercised_stock_options': 19794175,
   'expenses': 46950,
   'from_messages': 18,
   'from_poi_to_this_person': 42,
   'from_this_person_to_poi': 4,
   'loan_advances': 'NaN',
   'long_term_incentive': 1617011,
   'other': 174839,
   'poi': True,
   'restricted_stock': 2748364,
   'restricted_stock_deferred': 'NaN',
   'salary': 420636,
   'salary+bonus': 2170636.0,
   'salary_bonus_ratio': 4.160366682832663,
   'shared_receipt_with_poi': 864,
   'to_messages': 905,
   'total_payments': 505050,
   'total_stock_value': 22542539}),
 ('KAMINSKI WINCENTY J',
  {'bonus': 400000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'vince.kaminski@enron.com',
   'exercised_stock_options': 850010,
   'expenses': 83585,
   'from_messages': 14368,
   'from_poi_to_this_person': 41,
   'from_this_person_to_poi': 171,
   'loan_advances': 'NaN',
   'long_term_incentive': 323466,
   'other': 4669,
   'poi': False,
   'restricted_stock': 126027,
   'restricted_stock_deferred': 'NaN',
   'salary': 275101,
   'salary+bonus': 675101.0,
   'salary_bonus_ratio': 1.4540114357999425,
   'shared_receipt_with_poi': 583,
   'to_messages': 4607,
   'total_payments': 1086821,
   'total_stock_value': 976037}),
 ('LOCKHART EUGENE E',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 'NaN'}),
 ('COX DAVID',
  {'bonus': 800000,
   'deferral_payments': 'NaN',
   'deferred_income': -41250,
   'director_fees': 'NaN',
   'email_address': 'chip.cox@enron.com',
   'exercised_stock_options': 117551,
   'expenses': 27861,
   'from_messages': 33,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 4,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 494,
   'poi': False,
   'restricted_stock': 378082,
   'restricted_stock_deferred': 'NaN',
   'salary': 314288,
   'salary+bonus': 1114288.0,
   'salary_bonus_ratio': 2.5454360331924857,
   'shared_receipt_with_poi': 71,
   'to_messages': 102,
   'total_payments': 1101393,
   'total_stock_value': 495633}),
 ('OVERDYKE JR JERE C',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jere.overdyke@enron.com',
   'exercised_stock_options': 5266578,
   'expenses': 18834,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 135836,
   'other': 176,
   'poi': False,
   'restricted_stock': 2041016,
   'restricted_stock_deferred': 'NaN',
   'salary': 94941,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 249787,
   'total_stock_value': 7307594}),
 ('PEREIRA PAULO V. FERRAZ',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -101250,
   'director_fees': 101250,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 27942,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 27942,
   'total_stock_value': 'NaN'}),
 ('STABLER FRANK',
  {'bonus': 500000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'frank.stabler@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 16514,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 356071,
   'poi': False,
   'restricted_stock': 511734,
   'restricted_stock_deferred': 'NaN',
   'salary': 239502,
   'salary+bonus': 739502.0,
   'salary_bonus_ratio': 2.0876652387036434,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1112087,
   'total_stock_value': 511734}),
 ('SKILLING JEFFREY K',
  {'bonus': 5600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jeff.skilling@enron.com',
   'exercised_stock_options': 19250000,
   'expenses': 29336,
   'from_messages': 108,
   'from_poi_to_this_person': 88,
   'from_this_person_to_poi': 30,
   'loan_advances': 'NaN',
   'long_term_incentive': 1920000,
   'other': 22122,
   'poi': True,
   'restricted_stock': 6843672,
   'restricted_stock_deferred': 'NaN',
   'salary': 1111258,
   'salary+bonus': 6711258.0,
   'salary_bonus_ratio': 5.03933380007163,
   'shared_receipt_with_poi': 2042,
   'to_messages': 3627,
   'total_payments': 8682716,
   'total_stock_value': 26093672}),
 ('BLAKE JR. NORMAN P',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -113784,
   'director_fees': 113784,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 1279,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1279,
   'total_stock_value': 'NaN'}),
 ('SHERRICK JEFFREY B',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jeffrey.sherrick@enron.com',
   'exercised_stock_options': 1426469,
   'expenses': 'NaN',
   'from_messages': 25,
   'from_poi_to_this_person': 39,
   'from_this_person_to_poi': 18,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 405999,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 583,
   'to_messages': 613,
   'total_payments': 'NaN',
   'total_stock_value': 1832468}),
 ('PRENTICE JAMES',
  {'bonus': 'NaN',
   'deferral_payments': 564348,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'james.prentice@enron.com',
   'exercised_stock_options': 886231,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 208809,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 564348,
   'total_stock_value': 1095040}),
 ('GRAY RODNEY',
  {'bonus': 'NaN',
   'deferral_payments': 93585,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 365625,
   'other': 680833,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 6615,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1146658,
   'total_stock_value': 'NaN'}),
 ('PICKERING MARK R',
  {'bonus': 300000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'mark.pickering@enron.com',
   'exercised_stock_options': 28798,
   'expenses': 31653,
   'from_messages': 67,
   'from_poi_to_this_person': 7,
   'from_this_person_to_poi': 0,
   'loan_advances': 400000,
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 655037,
   'salary+bonus': 955037.0,
   'salary_bonus_ratio': 0.45798939601885086,
   'shared_receipt_with_poi': 728,
   'to_messages': 898,
   'total_payments': 1386690,
   'total_stock_value': 28798}),
 ('THE TRAVEL AGENCY IN THE PARK',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 362096,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 362096,
   'total_stock_value': 'NaN'}),
 ('NOLES JAMES L',
  {'bonus': 'NaN',
   'deferral_payments': 774401,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 463261,
   'restricted_stock_deferred': -94556,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 774401,
   'total_stock_value': 368705}),
 ('KEAN STEVEN J',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'steven.kean@enron.com',
   'exercised_stock_options': 2022048,
   'expenses': 41953,
   'from_messages': 6759,
   'from_poi_to_this_person': 140,
   'from_this_person_to_poi': 387,
   'loan_advances': 'NaN',
   'long_term_incentive': 300000,
   'other': 1231,
   'poi': False,
   'restricted_stock': 4131594,
   'restricted_stock_deferred': 'NaN',
   'salary': 404338,
   'salary+bonus': 1404338.0,
   'salary_bonus_ratio': 2.473178380463869,
   'shared_receipt_with_poi': 3639,
   'to_messages': 12754,
   'total_payments': 1747522,
   'total_stock_value': 6153642}),
 ('FOWLER PEGGY',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'kulvinder.fowler@enron.com',
   'exercised_stock_options': 1324578,
   'expenses': 'NaN',
   'from_messages': 36,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 560170,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 10,
   'to_messages': 517,
   'total_payments': 'NaN',
   'total_stock_value': 1884748}),
 ('WASAFF GEORGE',
  {'bonus': 325000,
   'deferral_payments': 831299,
   'deferred_income': -583325,
   'director_fees': 'NaN',
   'email_address': 'george.wasaff@enron.com',
   'exercised_stock_options': 1668260,
   'expenses': 'NaN',
   'from_messages': 30,
   'from_poi_to_this_person': 22,
   'from_this_person_to_poi': 7,
   'loan_advances': 'NaN',
   'long_term_incentive': 200000,
   'other': 1425,
   'poi': False,
   'restricted_stock': 388167,
   'restricted_stock_deferred': 'NaN',
   'salary': 259996,
   'salary+bonus': 584996.0,
   'salary_bonus_ratio': 1.2500192310650933,
   'shared_receipt_with_poi': 337,
   'to_messages': 400,
   'total_payments': 1034395,
   'total_stock_value': 2056427}),
 ('WHITE JR THOMAS E',
  {'bonus': 450000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'thomas.white@enron.com',
   'exercised_stock_options': 1297049,
   'expenses': 81353,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1085463,
   'poi': False,
   'restricted_stock': 13847074,
   'restricted_stock_deferred': 'NaN',
   'salary': 317543,
   'salary+bonus': 767543.0,
   'salary_bonus_ratio': 1.417130908254945,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 1934359,
   'total_stock_value': 15144123}),
 ('CHRISTODOULOU DIOMEDES',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'diomedes.christodoulou@enron.com',
   'exercised_stock_options': 5127155,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 950730,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 'NaN',
   'total_stock_value': 6077885}),
 ('ALLEN PHILLIP K',
  {'bonus': 4175000,
   'deferral_payments': 2869717,
   'deferred_income': -3081055,
   'director_fees': 'NaN',
   'email_address': 'phillip.allen@enron.com',
   'exercised_stock_options': 1729541,
   'expenses': 13868,
   'from_messages': 2195,
   'from_poi_to_this_person': 47,
   'from_this_person_to_poi': 65,
   'loan_advances': 'NaN',
   'long_term_incentive': 304805,
   'other': 152,
   'poi': False,
   'restricted_stock': 126027,
   'restricted_stock_deferred': -126027,
   'salary': 201955,
   'salary+bonus': 4376955.0,
   'salary_bonus_ratio': 20.672922185635414,
   'shared_receipt_with_poi': 1407,
   'to_messages': 2902,
   'total_payments': 4484442,
   'total_stock_value': 1729541}),
 ('SHARP VICTORIA T',
  {'bonus': 600000,
   'deferral_payments': 187469,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'vicki.sharp@enron.com',
   'exercised_stock_options': 281073,
   'expenses': 116337,
   'from_messages': 136,
   'from_poi_to_this_person': 24,
   'from_this_person_to_poi': 6,
   'loan_advances': 'NaN',
   'long_term_incentive': 422158,
   'other': 2401,
   'poi': False,
   'restricted_stock': 213063,
   'restricted_stock_deferred': 'NaN',
   'salary': 248146,
   'salary+bonus': 848146.0,
   'salary_bonus_ratio': 2.417931379107461,
   'shared_receipt_with_poi': 2477,
   'to_messages': 3136,
   'total_payments': 1576511,
   'total_stock_value': 494136}),
 ('JAEDICKE ROBERT',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -25000,
   'director_fees': 108750,
   'email_address': 'NaN',
   'exercised_stock_options': 431750,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 44093,
   'restricted_stock_deferred': -44093,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 83750,
   'total_stock_value': 431750}),
 ('WINOKUR JR. HERBERT S',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -25000,
   'director_fees': 108579,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 1413,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 84992,
   'total_stock_value': 'NaN'}),
 ('BROWN MICHAEL',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'michael.brown@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 49288,
   'from_messages': 41,
   'from_poi_to_this_person': 13,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 761,
   'to_messages': 1486,
   'total_payments': 49288,
   'total_stock_value': 'NaN'}),
 ('BADUM JAMES P',
  {'bonus': 'NaN',
   'deferral_payments': 178980,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 257817,
   'expenses': 3486,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 182466,
   'total_stock_value': 257817}),
 ('HUGHES JAMES A',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'james.hughes@enron.com',
   'exercised_stock_options': 754966,
   'expenses': 'NaN',
   'from_messages': 34,
   'from_poi_to_this_person': 35,
   'from_this_person_to_poi': 5,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 363428,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 589,
   'to_messages': 719,
   'total_payments': 'NaN',
   'total_stock_value': 1118394}),
 ('REYNOLDS LAWRENCE',
  {'bonus': 100000,
   'deferral_payments': 51365,
   'deferred_income': -200000,
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 4160672,
   'expenses': 8409,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 156250,
   'other': 202052,
   'poi': False,
   'restricted_stock': 201483,
   'restricted_stock_deferred': -140264,
   'salary': 76399,
   'salary+bonus': 176399.0,
   'salary_bonus_ratio': 1.3089176559902616,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 394475,
   'total_stock_value': 4221891}),
 ('DIMICHELE RICHARD G',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'richard.dimichele@enron.com',
   'exercised_stock_options': 8191755,
   'expenses': 35812,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 694862,
   'other': 374689,
   'poi': False,
   'restricted_stock': 126027,
   'restricted_stock_deferred': 'NaN',
   'salary': 262788,
   'salary+bonus': 1262788.0,
   'salary_bonus_ratio': 3.8053487982708494,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 2368151,
   'total_stock_value': 8317782}),
 ('BHATNAGAR SANJAY',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 137864,
   'email_address': 'sanjay.bhatnagar@enron.com',
   'exercised_stock_options': 2604490,
   'expenses': 'NaN',
   'from_messages': 29,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 1,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 137864,
   'poi': False,
   'restricted_stock': -2604490,
   'restricted_stock_deferred': 15456290,
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 463,
   'to_messages': 523,
   'total_payments': 15456290,
   'total_stock_value': 'NaN'}),
 ('CARTER REBECCA C',
  {'bonus': 300000,
   'deferral_payments': 'NaN',
   'deferred_income': -159792,
   'director_fees': 'NaN',
   'email_address': 'rebecca.carter@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 15,
   'from_poi_to_this_person': 29,
   'from_this_person_to_poi': 7,
   'loan_advances': 'NaN',
   'long_term_incentive': 75000,
   'other': 540,
   'poi': False,
   'restricted_stock': 307301,
   'restricted_stock_deferred': -307301,
   'salary': 261809,
   'salary+bonus': 561809.0,
   'salary_bonus_ratio': 1.14587351848103,
   'shared_receipt_with_poi': 196,
   'to_messages': 312,
   'total_payments': 477557,
   'total_stock_value': 'NaN'}),
 ('BUCHANAN HAROLD G',
  {'bonus': 500000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'john.buchanan@enron.com',
   'exercised_stock_options': 825464,
   'expenses': 600,
   'from_messages': 125,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 304805,
   'other': 1215,
   'poi': False,
   'restricted_stock': 189041,
   'restricted_stock_deferred': 'NaN',
   'salary': 248017,
   'salary+bonus': 748017.0,
   'salary_bonus_ratio': 2.015990839337626,
   'shared_receipt_with_poi': 23,
   'to_messages': 1088,
   'total_payments': 1054637,
   'total_stock_value': 1014505}),
 ('YEAP SOON',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 192758,
   'expenses': 55097,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 55097,
   'total_stock_value': 192758}),
 ('MURRAY JULIA H',
  {'bonus': 400000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'julia.murray@enron.com',
   'exercised_stock_options': 400478,
   'expenses': 57580,
   'from_messages': 45,
   'from_poi_to_this_person': 11,
   'from_this_person_to_poi': 2,
   'loan_advances': 'NaN',
   'long_term_incentive': 125000,
   'other': 330,
   'poi': False,
   'restricted_stock': 196983,
   'restricted_stock_deferred': 'NaN',
   'salary': 229284,
   'salary+bonus': 629284.0,
   'salary_bonus_ratio': 1.744561330053558,
   'shared_receipt_with_poi': 395,
   'to_messages': 2192,
   'total_payments': 812194,
   'total_stock_value': 597461}),
 ('GARLAND C KEVIN',
  {'bonus': 850000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'kevin.garland@enron.com',
   'exercised_stock_options': 636246,
   'expenses': 48405,
   'from_messages': 44,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 27,
   'loan_advances': 'NaN',
   'long_term_incentive': 375304,
   'other': 60814,
   'poi': False,
   'restricted_stock': 259907,
   'restricted_stock_deferred': 'NaN',
   'salary': 231946,
   'salary+bonus': 1081946.0,
   'salary_bonus_ratio': 3.6646460814155017,
   'shared_receipt_with_poi': 178,
   'to_messages': 209,
   'total_payments': 1566469,
   'total_stock_value': 896153}),
 ('DODSON KEITH',
  {'bonus': 70000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'keith.dodson@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 28164,
   'from_messages': 14,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 3,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 774,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 221003,
   'salary+bonus': 291003.0,
   'salary_bonus_ratio': 0.3167377818400655,
   'shared_receipt_with_poi': 114,
   'to_messages': 176,
   'total_payments': 319941,
   'total_stock_value': 'NaN'}),
 ('YEAGER F SCOTT',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'scott.yeager@enron.com',
   'exercised_stock_options': 8308552,
   'expenses': 53947,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 147950,
   'poi': True,
   'restricted_stock': 3576206,
   'restricted_stock_deferred': 'NaN',
   'salary': 158403,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 360300,
   'total_stock_value': 11884758}),
 ('HIRKO JOSEPH',
  {'bonus': 'NaN',
   'deferral_payments': 10259,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'joe.hirko@enron.com',
   'exercised_stock_options': 30766064,
   'expenses': 77978,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 2856,
   'poi': True,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 91093,
   'total_stock_value': 30766064}),
 ('DIETRICH JANET R',
  {'bonus': 600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'janet.dietrich@enron.com',
   'exercised_stock_options': 1550019,
   'expenses': 3475,
   'from_messages': 63,
   'from_poi_to_this_person': 305,
   'from_this_person_to_poi': 14,
   'loan_advances': 'NaN',
   'long_term_incentive': 556416,
   'other': 473,
   'poi': False,
   'restricted_stock': 315068,
   'restricted_stock_deferred': 'NaN',
   'salary': 250100,
   'salary+bonus': 850100.0,
   'salary_bonus_ratio': 2.3990403838464616,
   'shared_receipt_with_poi': 1902,
   'to_messages': 2572,
   'total_payments': 1410464,
   'total_stock_value': 1865087}),
 ('DERRICK JR. JAMES V',
  {'bonus': 800000,
   'deferral_payments': 'NaN',
   'deferred_income': -1284000,
   'director_fees': 'NaN',
   'email_address': 'james.derrick@enron.com',
   'exercised_stock_options': 8831913,
   'expenses': 51124,
   'from_messages': 909,
   'from_poi_to_this_person': 64,
   'from_this_person_to_poi': 20,
   'loan_advances': 'NaN',
   'long_term_incentive': 484000,
   'other': 7482,
   'poi': False,
   'restricted_stock': 1787380,
   'restricted_stock_deferred': -1787380,
   'salary': 492375,
   'salary+bonus': 1292375.0,
   'salary_bonus_ratio': 1.6247778624016247,
   'shared_receipt_with_poi': 1401,
   'to_messages': 2181,
   'total_payments': 550981,
   'total_stock_value': 8831913}),
 ('FREVERT MARK A',
  {'bonus': 2000000,
   'deferral_payments': 6426990,
   'deferred_income': -3367011,
   'director_fees': 'NaN',
   'email_address': 'mark.frevert@enron.com',
   'exercised_stock_options': 10433518,
   'expenses': 86987,
   'from_messages': 21,
   'from_poi_to_this_person': 242,
   'from_this_person_to_poi': 6,
   'loan_advances': 2000000,
   'long_term_incentive': 1617011,
   'other': 7427621,
   'poi': False,
   'restricted_stock': 4188667,
   'restricted_stock_deferred': 'NaN',
   'salary': 1060932,
   'salary+bonus': 3060932.0,
   'salary_bonus_ratio': 1.885134956811558,
   'shared_receipt_with_poi': 2979,
   'to_messages': 3275,
   'total_payments': 17252530,
   'total_stock_value': 14622185}),
 ('PAI LOU L',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'lou.pai@enron.com',
   'exercised_stock_options': 15364167,
   'expenses': 32047,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 1829457,
   'poi': False,
   'restricted_stock': 8453763,
   'restricted_stock_deferred': 'NaN',
   'salary': 261879,
   'salary+bonus': 1261879.0,
   'salary_bonus_ratio': 3.8185574253758414,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 3123383,
   'total_stock_value': 23817930}),
 ('BAY FRANKLIN R',
  {'bonus': 400000,
   'deferral_payments': 260455,
   'deferred_income': -201641,
   'director_fees': 'NaN',
   'email_address': 'frank.bay@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 129142,
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 69,
   'poi': False,
   'restricted_stock': 145796,
   'restricted_stock_deferred': -82782,
   'salary': 239671,
   'salary+bonus': 639671.0,
   'salary_bonus_ratio': 1.6689545251615756,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 827696,
   'total_stock_value': 63014}),
 ('HAYSLETT RODERICK J',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'rod.hayslett@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 1061,
   'from_poi_to_this_person': 35,
   'from_this_person_to_poi': 38,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 346663,
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 571,
   'to_messages': 2649,
   'total_payments': 'NaN',
   'total_stock_value': 346663}),
 ('FUGH JOHN L',
  {'bonus': 'NaN',
   'deferral_payments': 50591,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'NaN',
   'exercised_stock_options': 176378,
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 50591,
   'total_stock_value': 176378}),
 ('FALLON JAMES B',
  {'bonus': 2500000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'jim.fallon@enron.com',
   'exercised_stock_options': 940257,
   'expenses': 95924,
   'from_messages': 75,
   'from_poi_to_this_person': 42,
   'from_this_person_to_poi': 37,
   'loan_advances': 'NaN',
   'long_term_incentive': 374347,
   'other': 401481,
   'poi': False,
   'restricted_stock': 1392142,
   'restricted_stock_deferred': 'NaN',
   'salary': 304588,
   'salary+bonus': 2804588.0,
   'salary_bonus_ratio': 8.207808580771403,
   'shared_receipt_with_poi': 1604,
   'to_messages': 1755,
   'total_payments': 3676340,
   'total_stock_value': 2332399}),
 ('KOENIG MARK E',
  {'bonus': 700000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'mark.koenig@enron.com',
   'exercised_stock_options': 671737,
   'expenses': 127017,
   'from_messages': 61,
   'from_poi_to_this_person': 53,
   'from_this_person_to_poi': 15,
   'loan_advances': 'NaN',
   'long_term_incentive': 300000,
   'other': 150458,
   'poi': True,
   'restricted_stock': 1248318,
   'restricted_stock_deferred': 'NaN',
   'salary': 309946,
   'salary+bonus': 1009946.0,
   'salary_bonus_ratio': 2.2584579249288588,
   'shared_receipt_with_poi': 2271,
   'to_messages': 2374,
   'total_payments': 1587421,
   'total_stock_value': 1920055}),
 ('SAVAGE FRANK',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': -121284,
   'director_fees': 125034,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 3750,
   'total_stock_value': 'NaN'}),
 ('IZZO LAWRENCE L',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'larry.izzo@enron.com',
   'exercised_stock_options': 2165172,
   'expenses': 28093,
   'from_messages': 19,
   'from_poi_to_this_person': 28,
   'from_this_person_to_poi': 5,
   'loan_advances': 'NaN',
   'long_term_incentive': 312500,
   'other': 1553729,
   'poi': False,
   'restricted_stock': 3654808,
   'restricted_stock_deferred': 'NaN',
   'salary': 85274,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 437,
   'to_messages': 496,
   'total_payments': 1979596,
   'total_stock_value': 5819980}),
 ('TILNEY ELIZABETH A',
  {'bonus': 300000,
   'deferral_payments': 'NaN',
   'deferred_income': -575000,
   'director_fees': 'NaN',
   'email_address': 'elizabeth.tilney@enron.com',
   'exercised_stock_options': 591250,
   'expenses': 'NaN',
   'from_messages': 19,
   'from_poi_to_this_person': 10,
   'from_this_person_to_poi': 11,
   'loan_advances': 'NaN',
   'long_term_incentive': 275000,
   'other': 152055,
   'poi': False,
   'restricted_stock': 576792,
   'restricted_stock_deferred': 'NaN',
   'salary': 247338,
   'salary+bonus': 547338.0,
   'salary_bonus_ratio': 1.2129151201998885,
   'shared_receipt_with_poi': 379,
   'to_messages': 460,
   'total_payments': 399393,
   'total_stock_value': 1168042}),
 ('MARTIN AMANDA K',
  {'bonus': 'NaN',
   'deferral_payments': 85430,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'a..martin@enron.com',
   'exercised_stock_options': 2070306,
   'expenses': 8211,
   'from_messages': 230,
   'from_poi_to_this_person': 8,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 5145434,
   'other': 2818454,
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 349487,
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 477,
   'to_messages': 1522,
   'total_payments': 8407016,
   'total_stock_value': 2070306}),
 ('BUY RICHARD B',
  {'bonus': 900000,
   'deferral_payments': 649584,
   'deferred_income': -694862,
   'director_fees': 'NaN',
   'email_address': 'rick.buy@enron.com',
   'exercised_stock_options': 2542813,
   'expenses': 'NaN',
   'from_messages': 1053,
   'from_poi_to_this_person': 156,
   'from_this_person_to_poi': 71,
   'loan_advances': 'NaN',
   'long_term_incentive': 769862,
   'other': 400572,
   'poi': False,
   'restricted_stock': 901657,
   'restricted_stock_deferred': 'NaN',
   'salary': 330546,
   'salary+bonus': 1230546.0,
   'salary_bonus_ratio': 2.722767784211577,
   'shared_receipt_with_poi': 2333,
   'to_messages': 3523,
   'total_payments': 2355702,
   'total_stock_value': 3444470}),
 ('GRAMM WENDY L',
  {'bonus': 'NaN',
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 119292,
   'email_address': 'NaN',
   'exercised_stock_options': 'NaN',
   'expenses': 'NaN',
   'from_messages': 'NaN',
   'from_poi_to_this_person': 'NaN',
   'from_this_person_to_poi': 'NaN',
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 'NaN',
   'restricted_stock_deferred': 'NaN',
   'salary': 'NaN',
   'salary+bonus': -1,
   'salary_bonus_ratio': -1,
   'shared_receipt_with_poi': 'NaN',
   'to_messages': 'NaN',
   'total_payments': 119292,
   'total_stock_value': 'NaN'}),
 ('CAUSEY RICHARD A',
  {'bonus': 1000000,
   'deferral_payments': 'NaN',
   'deferred_income': -235000,
   'director_fees': 'NaN',
   'email_address': 'richard.causey@enron.com',
   'exercised_stock_options': 'NaN',
   'expenses': 30674,
   'from_messages': 49,
   'from_poi_to_this_person': 58,
   'from_this_person_to_poi': 12,
   'loan_advances': 'NaN',
   'long_term_incentive': 350000,
   'other': 307895,
   'poi': True,
   'restricted_stock': 2502063,
   'restricted_stock_deferred': 'NaN',
   'salary': 415189,
   'salary+bonus': 1415189.0,
   'salary_bonus_ratio': 2.4085416521150607,
   'shared_receipt_with_poi': 1585,
   'to_messages': 1892,
   'total_payments': 1868758,
   'total_stock_value': 2502063}),
 ('TAYLOR MITCHELL S',
  {'bonus': 600000,
   'deferral_payments': 227449,
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'mitchell.taylor@enron.com',
   'exercised_stock_options': 3181250,
   'expenses': 'NaN',
   'from_messages': 29,
   'from_poi_to_this_person': 0,
   'from_this_person_to_poi': 0,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 'NaN',
   'poi': False,
   'restricted_stock': 563798,
   'restricted_stock_deferred': 'NaN',
   'salary': 265214,
   'salary+bonus': 865214.0,
   'salary_bonus_ratio': 2.2623240100447184,
   'shared_receipt_with_poi': 300,
   'to_messages': 533,
   'total_payments': 1092663,
   'total_stock_value': 3745048}),
 ('DONAHUE JR JEFFREY M',
  {'bonus': 800000,
   'deferral_payments': 'NaN',
   'deferred_income': -300000,
   'director_fees': 'NaN',
   'email_address': 'jeff.donahue@enron.com',
   'exercised_stock_options': 765920,
   'expenses': 96268,
   'from_messages': 22,
   'from_poi_to_this_person': 188,
   'from_this_person_to_poi': 11,
   'loan_advances': 'NaN',
   'long_term_incentive': 'NaN',
   'other': 891,
   'poi': False,
   'restricted_stock': 315068,
   'restricted_stock_deferred': 'NaN',
   'salary': 278601,
   'salary+bonus': 1078601.0,
   'salary_bonus_ratio': 2.8714900520816506,
   'shared_receipt_with_poi': 772,
   'to_messages': 865,
   'total_payments': 875760,
   'total_stock_value': 1080988}),
 ('GLISAN JR BEN F',
  {'bonus': 600000,
   'deferral_payments': 'NaN',
   'deferred_income': 'NaN',
   'director_fees': 'NaN',
   'email_address': 'ben.glisan@enron.com',
   'exercised_stock_options': 384728,
   'expenses': 125978,
   'from_messages': 16,
   'from_poi_to_this_person': 52,
   'from_this_person_to_poi': 6,
   'loan_advances': 'NaN',
   'long_term_incentive': 71023,
   'other': 200308,
   'poi': True,
   'restricted_stock': 393818,
   'restricted_stock_deferred': 'NaN',
   'salary': 274975,
   'salary+bonus': 874975.0,
   'salary_bonus_ratio': 2.1820165469588146,
   'shared_receipt_with_poi': 874,
   'to_messages': 873,
   'total_payments': 1272284,
   'total_stock_value': 778546})]
In [84]:
    
import sys
sys.path.append("./tools/")
from feature_format import featureFormat, targetFeatureSplit
import numpy as np
features_all = [
    'poi',
    'salary',
    'to_messages',
    'deferral_payments',
    'total_payments',
    'exercised_stock_options',
    'bonus',
    'restricted_stock',
    'shared_receipt_with_poi',
    'restricted_stock_deferred',
    'total_stock_value',
    'expenses',
    'loan_advances',
    'from_messages',
    'other',
    'from_this_person_to_poi',
    'director_fees',
    'deferred_income',
    'long_term_incentive',
    # 'email_address',
    'from_poi_to_this_person',
    'salary_bonus_ratio',
]
features_list=features_all
data = featureFormat(data_dict, features_list, sort_keys = True)
labels, features = targetFeatureSplit(data)
    
In [ ]:
    
    
In [85]:
    
from sklearn.feature_selection import SelectKBest, f_classif
# Perform feature selection
selector = SelectKBest(f_classif, k=5)
selector.fit(features, labels)
# Get the raw p-values for each feature, and transform from p-values into scores
scores = -np.log10(selector.pvalues_)
scores= selector.scores_
predictors = features_list[1:]
sort_indices = np.argsort(scores)[::-1]
# Plot the scores.  See how "Pclass", "Sex", "Title", and "Fare" are the best?
X=np.arange(len(predictors))
Y=scores[sort_indices]
X_labels = map(lambda x: x.replace("_"," ").title(),np.array(predictors)[sort_indices])
ax = plt.subplot(111)
ax.bar(X, Y,edgecolor='white',facecolor='#9999ff')
plt.xticks(X+0.4, X_labels, rotation='vertical')
for x,y in zip(X,Y):
    ax.text(x+0.4, y+0.05, '%.2f' % y, ha='center', va= 'bottom')
pass
plt.tick_params(bottom='off',top='off', right='off', left='off')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
    
    
 
In [86]:
    
zip(np.array(predictors)[sort_indices],scores[sort_indices])
    
    Out[86]:
[('exercised_stock_options', 25.380105299760199),
 ('total_stock_value', 24.752523020258508),
 ('bonus', 21.327890413979102),
 ('salary', 18.861795316466416),
 ('salary_bonus_ratio', 12.278007938540965),
 ('deferred_income', 11.732698076065354),
 ('long_term_incentive', 10.222904205832778),
 ('restricted_stock', 9.4807432034789336),
 ('total_payments', 8.9678193476776205),
 ('shared_receipt_with_poi', 8.9038215571655712),
 ('loan_advances', 7.3014066515360359),
 ('expenses', 6.3746144901977475),
 ('from_poi_to_this_person', 5.4466874833253529),
 ('other', 4.2635766381444693),
 ('from_this_person_to_poi', 2.470521222656084),
 ('director_fees', 2.0893098994318806),
 ('to_messages', 1.7516942790340737),
 ('deferral_payments', 0.20970584227026345),
 ('from_messages', 0.1587702392129193),
 ('restricted_stock_deferred', 0.064477028038728595)]
In [87]:
    
list(np.array(predictors)[sort_indices])
    
    Out[87]:
['exercised_stock_options',
 'total_stock_value',
 'bonus',
 'salary',
 'salary_bonus_ratio',
 'deferred_income',
 'long_term_incentive',
 'restricted_stock',
 'total_payments',
 'shared_receipt_with_poi',
 'loan_advances',
 'expenses',
 'from_poi_to_this_person',
 'other',
 'from_this_person_to_poi',
 'director_fees',
 'to_messages',
 'deferral_payments',
 'from_messages',
 'restricted_stock_deferred']
In [ ]:
    
    
Content source: luiscruz/udacity_data_analyst
Similar notebooks: